for (i = 0; i < testDataCount; i++)
{
DBG("3 %d %s",i,moduleList[i].name);
- test = &moduleList[i];
+ //test = &moduleList[i];
// just for safety
if(moduleList[i].result>3)
moduleList[i].result=TBT_INFO_RESULT_NOT_TESTED; // set result not tested
char *server_path = get_storage_image_dir_path();
result = bt_opp_server_initialize_by_connection_request(server_path, _adpter_bt_opp_server_connection_requested_cb,this);
DBG("bt_opp_server_initialize_by_connection_request %s %s ", get_bluetooth_error(result), app_get_resource_path());
+ SAFE_DELETE(server_path);
RETM_IF(result != BT_ERROR_NONE, "[bt_opp_server_initialize_by_connection_request] Failed. > Error = %s", get_bluetooth_error(result));
- free(server_path);
}
}
else if(this->view->tbt_info->apptype == TBT_APP_BT_AUDIO_CONNECT ||
DBG("_motion_get_activity_type");
const int LEN = 100;
char string[LEN];
+ snprintf(string, LEN, "Unrecognized Activity");
+ DBG("Unrecognized Activity");
switch(activity_type)
{
case ACTIVITY_STATIONARY :
snprintf(string, LEN, "Activity is In Vehicle");
DBG("ACTIVITY_IN_VEHICLE ");
break;
- default :
- snprintf(string, LEN, "Unrecognized Activity");
- DBG("Unrecognized Activity");
}
return strdup(string);
}
DBG("[Noti Data] message : [%s]", msg);
/* Get action value and alertMessage value */
- char *action = get_value_from_message(strdup(msg), "action");
- char *alert_message = get_value_from_message(strdup(msg), "alertMessage");
+ char *action_msg = strdup(msg);
+ char *action = get_value_from_message(action_msg, "action");
+ SAFE_DELETE(action_msg);
+ char *alert_msg = strdup(msg);
+ char *alert_message = get_value_from_message(alert_msg, "alertMessage");
+ SAFE_DELETE(alert_msg);
DBG("------------- action: [%s] ---------------", action);
DBG("------------ alert_message: [%s] ------------", alert_message);
if (msg_bundle)
{
/* Payload push message to bundle object */
- bundle_add_str(msg_bundle, BUNDLE_KEY_MSG, strdup(buf_msg));
+ char * buf_msg_val = strdup(buf_msg);
+ bundle_add_str(msg_bundle, BUNDLE_KEY_MSG, buf_msg_val);
+ SAFE_DELETE(buf_msg_val);
DBG("message [%s], key [%s]", buf_msg, BUNDLE_KEY_MSG);
+ char * buf_time_val = strdup(buf_time);
bundle_add_str(msg_bundle, BUNDLE_KEY_TIME, strdup(buf_time));
+ SAFE_DELETE(buf_time_val);
DBG("time [%s], key [%s]", buf_time, BUNDLE_KEY_TIME);
this->msg_bundle = msg_bundle;
deliver_message(this);