Fix the crash in PBAP operations 04/66304/1 accepted/tizen/common/20160419.143012 accepted/tizen/ivi/20160418.235603 accepted/tizen/mobile/20160418.235541 accepted/tizen/tv/20160418.235558 accepted/tizen/wearable/20160418.235527 submit/tizen/20160418.083706
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 18 Apr 2016 08:33:42 +0000 (17:33 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 18 Apr 2016 08:33:42 +0000 (17:33 +0900)
Change-Id: I997238d0d8d8326ee050122af936fe58d5424343
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service/bt-request-handler.c
bt-service/bt-service-pbap.c [changed mode: 0755->0644]

index 01cbaed..f22b794 100755 (executable)
@@ -2277,6 +2277,13 @@ gboolean __bt_service_check_privilege(int function_name,
        case BT_LE_WRITE_HOST_SUGGESTED_DATA_LENGTH:
        case BT_LE_READ_HOST_SUGGESTED_DATA_LENGTH:
        case BT_LE_SET_DATA_LENGTH:
+       case BT_PBAP_CONNECT:
+       case BT_PBAP_DISCONNECT:
+       case BT_PBAP_GET_PHONEBOOK_SIZE:
+       case BT_PBAP_GET_PHONEBOOK:
+       case BT_PBAP_GET_LIST:
+       case BT_PBAP_PULL_VCARD:
+       case BT_PBAP_PHONEBOOK_SEARCH:
                 ret_val = cynara_check(p_cynara, client_creds, client_session, user_creds,
                                                                                  BT_PRIVILEGE_PLATFORM);
 
old mode 100755 (executable)
new mode 100644 (file)
index 382dd9a..c190640
@@ -349,7 +349,6 @@ int _bt_pbap_connect(const bluetooth_device_address_t *address)
                        temp,
                        G_DBUS_CALL_FLAGS_NONE, -1, NULL,
                        (GAsyncReadyCallback)__bt_pbap_connect_cb, ptr);
-       g_free(ptr);
 
        BT_DBG("-");
        return 0;
@@ -851,7 +850,6 @@ int __bt_pbap_call_get_phonebook(GDBusProxy *proxy, bt_pbap_data_t *pbap_data)
 
        g_free(format_str);
        g_free(order_str);
-       g_hash_table_destroy((GHashTable *)filters);
 
        BT_DBG("-");
        return BLUETOOTH_ERROR_NONE;
@@ -977,7 +975,6 @@ int __bt_pbap_call_get_vcard(GDBusProxy *proxy, bt_pbap_data_t *pbap_data)
 
        g_free(format_str);
        g_free(vcard_handle);
-       g_hash_table_destroy((GHashTable *)filters);
 
        BT_DBG("-");
        return BLUETOOTH_ERROR_NONE;
@@ -1027,7 +1024,6 @@ int __bt_pbap_call_search_phonebook(GDBusProxy *proxy, bt_pbap_data_t *pbap_data
        g_free(value);
        g_free(order_str);
        g_free(field);
-       g_hash_table_destroy((GHashTable *)filters);
 
        BT_DBG("-");
        return BLUETOOTH_ERROR_NONE;
@@ -1370,7 +1366,7 @@ int _bt_pbap_phonebook_search(const bluetooth_device_address_t *address,
                BT_DBG("Address String: %s", address_string);
 
        source_string = g_strdup(SOURCE[source]);
-       type_string = g_strdup("nil");
+       type_string = g_strdup(TYPE[type]);
 
        BT_DBG("Address[%s] Source[%s] Type[%s]",
                        address_string, source_string, type_string);