Fix svace 2.2 version issues 72/100772/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 29 Nov 2016 07:31:54 +0000 (16:31 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Wed, 30 Nov 2016 04:18:24 +0000 (20:18 -0800)
Change-Id: I593775e64ae7d45a139ac2607b970dbd20abedb2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-core/bt-core-dbus-handler.c
bt-service/bt-service-device.c
bt-service/bt-service-event-receiver.c
bt-service/bt-service-event-sender.c
packaging/bluetooth-frwk.spec
test/bluetooth-frwk-test.c

index 716059b..c9c07c3 100755 (executable)
@@ -218,7 +218,7 @@ int _bt_core_service_request(int service_type, int service_function,
                        GArray **out_param1)
 {
        GDBusProxy  *proxy;
-       GVariant *ret;
+       GVariant *ret = NULL;
        GVariant *param1;
        GVariant *param2;
        GVariant *param3;
index b3ec8b5..9f480bf 100644 (file)
@@ -3074,12 +3074,6 @@ int _bt_request_att_mtu(int request_id, bluetooth_device_address_t *device_addre
        g_free(device_path);
        retv_if(device_proxy == NULL, BLUETOOTH_ERROR_INTERNAL);
 
-       if (device_path == NULL) {
-               BT_DBG("device_path NULL");
-               ret = BLUETOOTH_ERROR_INTERNAL;
-               goto fail;
-       }
-
        att_mtu_req_info = g_malloc0(sizeof(bt_funcion_data_t));
        att_mtu_req_info->addr = (char *)g_strdup(address);
        att_mtu_req_info->req_id = request_id;
index 5f9c82e..616d446 100644 (file)
@@ -825,6 +825,9 @@ static void __bt_adapter_property_changed_event(GVariant *msg, const char *path)
                        char *value = NULL;
                        GVariantIter *iter = NULL;
                        g_variant_get(val, "as", &iter);
+
+                       ret_if(iter == NULL);
+
                        while (g_variant_iter_loop(iter, "s", &name)) {
                                BT_DBG("name = %s", name);
                                g_variant_iter_loop(iter, "s", &value);
@@ -832,8 +835,8 @@ static void __bt_adapter_property_changed_event(GVariant *msg, const char *path)
                                if (FALSE == _bt_update_le_feature_support(name, value))
                                        BT_INFO("Fail to update LE feature info");
                        }
-                       if (iter)
-                               g_variant_iter_free(iter);
+
+                       g_variant_iter_free(iter);
                } else if (strcasecmp(property, "IpspInitStateChanged") == 0) {
                        gboolean ipsp_initialized = FALSE;
 
@@ -2161,6 +2164,9 @@ void _bt_handle_device_event(GVariant *msg, const char *member, const char *path
                                                &le_dev_info->rssi,
                                                &le_dev_info->adv_data_len,
                                                &value);
+
+               ret_if(value == NULL);
+
                _bt_convert_device_path_to_address(path, le_dev_info->address);
 
                buffer_len = g_variant_get_size(value);
index 91d431e..089d174 100644 (file)
@@ -549,7 +549,7 @@ int _bt_init_service_event_sender(void)
        }
 
        conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
-       retv_if(conn == NULL, BLUETOOTH_ERROR_INTERNAL);
+
        if (conn == NULL) {
                BT_ERR("conn == NULL");
                if (err) {
@@ -584,7 +584,7 @@ int _bt_init_hf_local_term_event_sender(void)
        }
 
        conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
-       retv_if(conn == NULL, BLUETOOTH_ERROR_INTERNAL);
+
        if (conn == NULL) {
                BT_ERR("conn == NULL");
                if (err) {
index e84e7c4..eeefd37 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:       bluetooth-frwk
 Summary:    Bluetooth framework for BlueZ and Obexd. This package is Bluetooth framework based on BlueZ and Obexd stack.
-Version:    0.2.155
+Version:    0.2.156
 Release:    1
 Group:      Network & Connectivity/Bluetooth
 License:    Apache-2.0
index eb58d5a..7cdc870 100644 (file)
@@ -292,7 +292,7 @@ int test_input_callback(void *data)
                break;
 
        case 1:
-               bluetooth_register_callback(bt_event_callback, NULL);
+               ret = bluetooth_register_callback(bt_event_callback, NULL);
                if (ret < 0) {
                        TC_PRT("%s failed with [0x%04x]", tc_table[0].tc_name, ret);
                        tc_result(TC_FAIL, 1);
@@ -300,7 +300,7 @@ int test_input_callback(void *data)
                break;
 
        case 2:
-               bluetooth_unregister_callback();
+               ret = bluetooth_unregister_callback();
                if (ret < 0) {
                        TC_PRT("%s failed with [0x%04x]", tc_table[1].tc_name, ret);
                        tc_result(TC_FAIL, 1);