comparison src/cs/services/dar/dar_api.c @ 278:ca343ccbca81

dar_reset_system(): check the entity_dar_callback pointer for NULL before calling through it
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 07 Aug 2017 04:20:45 +0000
parents 945cf7f506b2
children
comparison
equal deleted inserted replaced
277:045541ab3ef5 278:ca343ccbca81
456 456
457 /* Update the DAR recovery status */ 457 /* Update the DAR recovery status */
458 dar_current_status = DAR_NORMAL_SCUTTLING; 458 dar_current_status = DAR_NORMAL_SCUTTLING;
459 459
460 /* Call the MMI callback function to save some parameters before reset */ 460 /* Call the MMI callback function to save some parameters before reset */
461 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE); 461 if (dar_gbl_var_p->entity_dar_callback != NULL)
462 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
462 463
463 /* Send a trace before the reset of the system */ 464 /* Send a trace before the reset of the system */
464 DAR_SEND_TRACE("Voluntary reset of the system",RV_TRACE_LEVEL_DEBUG_HIGH); 465 DAR_SEND_TRACE("Voluntary reset of the system",RV_TRACE_LEVEL_DEBUG_HIGH);
465 466
466 dar_reset(); 467 dar_reset();