X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bt-api%2Fbt-event-handler.c;h=105d1cca28aca5116e82a5980a9579a878167d3c;hb=67224888f47ce8bbaa1dc26488f46e96b3213dd0;hp=d79bebcb5dcf545ce9ae9246b8051e38685edebd;hpb=4da5859a5659765615d14ac0f845c9c6b3dbaab0;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git diff --git a/bt-api/bt-event-handler.c b/bt-api/bt-event-handler.c index d79bebc..105d1cc 100644 --- a/bt-api/bt-event-handler.c +++ b/bt-api/bt-event-handler.c @@ -2125,7 +2125,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, folders_struct.size = g_variant_iter_n_children(iter); folders_struct.names = (char**) g_malloc0(folders_struct.size * sizeof(*(folders_struct.names))); - BT_DBG("g_variant_iter_n_children: %d", folders_struct.size); + BT_DBG("g_variant_iter_n_children: %lli", (long long int)folders_struct.size); GVariantIter* res = NULL; int i = 0; while (g_variant_iter_loop(iter, "a{sv}", &res)) { @@ -2210,7 +2210,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, messages_struct.size = g_variant_iter_n_children(iter); messages_struct.message_items = (bt_map_client_message_item_t*) g_malloc(messages_struct.size * sizeof(*(messages_struct.message_items))); - BT_DBG("g_variant_iter_n_children: %d", messages_struct.size); + BT_DBG("g_variant_iter_n_children: %lli", (long long int)messages_struct.size); char *object = NULL; GVariantIter *properites = NULL; @@ -2280,7 +2280,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, } else if (strcmp(key, "Size") == 0) { g_variant_get(value, "t", &value_int); messages_struct.message_items[i].size = value_int; - BT_DBG(" Size: %d", value_int); + BT_DBG(" Size: %llu", (unsigned long long int)value_int); } else if (strcmp(key, "Text") == 0) { g_variant_get(value, "b", &value_bool); messages_struct.message_items[i].is_text = value_bool ? 1 : 0; @@ -2292,7 +2292,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, } else if (strcmp(key, "AttachmentSize") == 0) { g_variant_get(value, "t", &value_int); messages_struct.message_items[i].attachment_size = value_int; - BT_DBG(" AttachmentSize: %d", value_int); + BT_DBG(" AttachmentSize: %llu", (unsigned long long int)value_int); } else if (strcmp(key, "Priority") == 0) { g_variant_get(value, "b", &value_bool); messages_struct.message_items[i].is_priority = value_bool ? 1 : 0; @@ -2478,7 +2478,7 @@ void __bt_pbap_client_event_filter(GDBusConnection *connection, for (i = 0; i < count; i++) BT_DBG("%s", list[i]); - BT_DBG("address: %s, result: %d, count: %d, success: %d", + BT_DBG("address: %s, result: %d, count: %zd, success: %d", address, result, count, success); _bt_convert_addr_string_to_type(vc_list.btaddr.addr, @@ -3852,7 +3852,7 @@ static void __bt_gatt_server_event_filter(GDBusConnection *connection, } else if (strcasecmp(signal_name, BT_GATT_SERVER_ACQUIRE_NOTIFICATION) == 0) { - bluetooth_gatt_server_send_acquire_notify_response(parameters); + bluetooth_gatt_server_send_acquire_notify_response(parameters, event_info); } else if (strcasecmp(signal_name, BT_GATT_SERVER_NOTIFICATION_COMPLETED) == 0) { const char *address = NULL; @@ -3898,6 +3898,9 @@ static void __bt_gatt_server_event_filter(GDBusConnection *connection, BT_INFO("GATT Server: Notification Enabled?? Handle: [%d] address [%s] Is Enabled [%d] result [%d]", info.handle, address, info.notification, result); + if (info.notification == FALSE) + cleanup_gatt_acquire_fd(info.handle); + _bt_gatt_server_event_cb(BLUETOOTH_EVENT_GATT_SERVER_NOTIFICATION_STATE_CHANGED, result, &info, event_info->cb, event_info->user_data); @@ -4037,7 +4040,7 @@ int _bt_register_event(int event_type, void *event_cb, void *user_data) return BLUETOOTH_ERROR_INTERNAL; } - connection_type = _bt_gdbus_get_system_gconn(); + connection_type = _bt_get_system_private_conn(); if (connection_type == NULL) return BLUETOOTH_ERROR_INTERNAL; @@ -4078,7 +4081,7 @@ int _bt_unregister_event(int event_type) return BLUETOOTH_ERROR_INTERNAL; } - connection_type = _bt_gdbus_get_system_gconn(); + connection_type = _bt_get_system_private_conn(); event_list = g_slist_remove(event_list, (void *)cb_data); @@ -4126,7 +4129,7 @@ void _bt_register_name_owner_changed(void) { GDBusConnection *connection_type; - connection_type = _bt_gdbus_get_system_gconn(); + connection_type = _bt_get_system_private_conn(); if (connection_type == NULL) { BT_ERR("Unable to get the bus"); return; @@ -4141,7 +4144,7 @@ void _bt_unregister_name_owner_changed(void) { GDBusConnection *connection_type; - connection_type = _bt_gdbus_get_system_gconn(); + connection_type = _bt_get_system_private_conn(); if (connection_type != NULL && owner_sig_id > 0) { g_dbus_connection_signal_unsubscribe(connection_type, owner_sig_id); @@ -4157,11 +4160,11 @@ static void __bt_gatt_get_uuid_from_path(char *path, char **service_uuid) GVariant *ret = NULL; GVariant *value = NULL; - g_conn = _bt_gdbus_get_system_gconn(); + g_conn = _bt_get_system_private_conn(); ret_if(g_conn == NULL); proxy = g_dbus_proxy_new_sync(g_conn, - G_DBUS_PROXY_FLAGS_NONE, NULL, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL, BT_BLUEZ_NAME, path, BT_PROPERTIES_INTERFACE, @@ -4279,7 +4282,7 @@ int _bt_register_manager_subscribe_signal(gboolean subscribe) static guint service_added_id = 0; static guint interface_removed_id = 0; - g_conn = _bt_gdbus_get_system_gconn(); + g_conn = _bt_get_system_private_conn(); if (g_conn == NULL) return BLUETOOTH_ERROR_INTERNAL;