Fix : Bonding complete event is sent twice.
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-device.c
index 82c81ee..c1599a7 100644 (file)
@@ -697,9 +697,6 @@ static void __bt_bond_device_cb(GDBusProxy *proxy, GAsyncResult *res,
        GVariant *out_param1;
        request_info_t *req_info;
        bluetooth_device_info_t dev_info;
-       bt_remote_dev_info_t *remote_dev_info;
-       GVariant *manufacture_data;
-       GVariant *param;
 
        /* Terminate ALL system popup */
        syspopup_destroy_all();
@@ -836,45 +833,6 @@ static void __bt_bond_device_cb(GDBusProxy *proxy, GAsyncResult *res,
                goto dbus_return;
        }
 
-       remote_dev_info = _bt_get_remote_device_info(bonding_info->addr);
-       if (!remote_dev_info)
-               goto dbus_return;
-
-       GVariant *uuids = NULL;
-       GVariantBuilder *builder = NULL;
-       int i = 0;
-       builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
-       for (i = 0; i < remote_dev_info->uuid_count; i++) {
-               g_variant_builder_add(builder, "s",
-                       remote_dev_info->uuids[i]);
-       }
-       uuids = g_variant_new("as", builder);
-       g_variant_builder_unref(builder);
-       manufacture_data = g_variant_new_from_data((const GVariantType *)"ay",
-                                               remote_dev_info->manufacturer_data, remote_dev_info->manufacturer_data_len,
-                                               TRUE, NULL, NULL);
-
-       param = g_variant_new("(isunsbub@asn@ay)",
-                       result,
-                       bonding_info->addr,
-                       remote_dev_info->class,
-                       remote_dev_info->rssi,
-                       remote_dev_info->name,
-                       remote_dev_info->paired,
-                       remote_dev_info->connected,
-                       remote_dev_info->trust,
-                       uuids,
-                       remote_dev_info->manufacturer_data_len,
-                       manufacture_data);
-
-
-       /* Send the event to application */
-       _bt_send_event(BT_ADAPTER_EVENT,
-               BLUETOOTH_EVENT_BONDING_FINISHED,
-               param);
-
-       _bt_free_device_info(remote_dev_info);
-
 dbus_return:
        if (req_info->context == NULL)
                goto done;