[TBT][Non-ACR][tbtcoreapp][Svace Fix] 27/160627/2
authornibha2 <nibha.sharma@samsung.com>
Fri, 17 Nov 2017 07:16:38 +0000 (12:46 +0530)
committershobhit verma <shobhit.v@samsung.com>
Mon, 20 Nov 2017 09:43:23 +0000 (09:43 +0000)
Change-Id: Ib03cf30e314a99ee6f8dfd8e0b4a3e9c308bce53
Signed-off-by: nibha2 <nibha.sharma@samsung.com>
release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk [changed mode: 0644->0755]
release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk [changed mode: 0644->0755]
tbtcoreapp/src/utils/util_state_object.c [changed mode: 0644->0755]
tbtcoreapp/src/utils/xml-util.c [changed mode: 0644->0755]
tbtcoreapp/src/view/tbt-bluetooth-view.c [changed mode: 0644->0755]
tbtcoreapp/src/view/tbt-iotcon-view.c [changed mode: 0644->0755]
tbtcoreapp/src/view/tbt-motion-detection-view.c [changed mode: 0644->0755]
tbtcoreapp/src/view/tbt-push-view.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
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
old mode 100644 (file)
new mode 100755 (executable)
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
old mode 100644 (file)
new mode 100755 (executable)
index 7fdcf7f..1c7156d
@@ -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;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 2c7c85f..8ef3c2e
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 09f5773..6ee689b
@@ -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 ||
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 84c43a2..e977e69
@@ -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);
 }
old mode 100644 (file)
new mode 100755 (executable)
index ae76a0d..25caf20
@@ -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);