From: nibha2 Date: Fri, 17 Nov 2017 07:16:38 +0000 (+0530) Subject: [TBT][Non-ACR][tbtcoreapp][Svace Fix] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67b09ed799e5cbd26e9452b0818c36db05629007;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][Non-ACR][tbtcoreapp][Svace Fix] Change-Id: Ib03cf30e314a99ee6f8dfd8e0b4a3e9c308bce53 Signed-off-by: nibha2 --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk old mode 100644 new mode 100755 index 60e91ac..d62c4d0 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk old mode 100644 new mode 100755 index 4447c83..6dad381 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk differ diff --git a/tbtcoreapp/src/utils/util_state_object.c b/tbtcoreapp/src/utils/util_state_object.c old mode 100644 new mode 100755 index 7fdcf7f..1c7156d --- a/tbtcoreapp/src/utils/util_state_object.c +++ b/tbtcoreapp/src/utils/util_state_object.c @@ -211,7 +211,6 @@ util_state_info* util_state_object_add_state(util_state_object *object,const cha state->name=strdup(name); state->state=state_value; state->transitions=NULL; - return NULL; } diff --git a/tbtcoreapp/src/utils/xml-util.c b/tbtcoreapp/src/utils/xml-util.c old mode 100644 new mode 100755 index 2c7c85f..8ef3c2e --- a/tbtcoreapp/src/utils/xml-util.c +++ b/tbtcoreapp/src/utils/xml-util.c @@ -108,7 +108,7 @@ void xmlUtil_writeResults(const char *inputFilePath,tbt_info *moduleList,const i 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 diff --git a/tbtcoreapp/src/view/tbt-bluetooth-view.c b/tbtcoreapp/src/view/tbt-bluetooth-view.c old mode 100644 new mode 100755 index 09f5773..6ee689b --- a/tbtcoreapp/src/view/tbt-bluetooth-view.c +++ b/tbtcoreapp/src/view/tbt-bluetooth-view.c @@ -605,8 +605,8 @@ static void update_view_controls(bluetooth_view *this) 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 || diff --git a/tbtcoreapp/src/view/tbt-iotcon-view.c b/tbtcoreapp/src/view/tbt-iotcon-view.c old mode 100644 new mode 100755 diff --git a/tbtcoreapp/src/view/tbt-motion-detection-view.c b/tbtcoreapp/src/view/tbt-motion-detection-view.c old mode 100644 new mode 100755 index 84c43a2..e977e69 --- a/tbtcoreapp/src/view/tbt-motion-detection-view.c +++ b/tbtcoreapp/src/view/tbt-motion-detection-view.c @@ -176,6 +176,8 @@ static char * _motion_get_activity_type(activity_type_e activity_type) 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 : @@ -194,9 +196,6 @@ static char * _motion_get_activity_type(activity_type_e activity_type) snprintf(string, LEN, "Activity is In Vehicle"); DBG("ACTIVITY_IN_VEHICLE "); break; - default : - snprintf(string, LEN, "Unrecognized Activity"); - DBG("Unrecognized Activity"); } return strdup(string); } diff --git a/tbtcoreapp/src/view/tbt-push-view.c b/tbtcoreapp/src/view/tbt-push-view.c old mode 100644 new mode 100755 index ae76a0d..25caf20 --- a/tbtcoreapp/src/view/tbt-push-view.c +++ b/tbtcoreapp/src/view/tbt-push-view.c @@ -648,8 +648,12 @@ static void handle_push_message(const char *data, const char *msg, long long int 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); @@ -677,9 +681,13 @@ static void handle_push_message(const char *data, const char *msg, long long int 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);