tools/btpclient: Remove btp unsupported auth request call 59/205059/1
authorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Wed, 28 Feb 2018 12:41:23 +0000 (13:41 +0100)
committerAmit Purwar <amit.purwar@samsung.com>
Mon, 29 Apr 2019 04:18:47 +0000 (09:48 +0530)
BTP don't support authorization request event.

Change-Id: I81bfbd0b03871a4802067fcc15b80dec6e282dbf
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
tools/btpclient.c

index e98423a..ac13692 100644 (file)
@@ -1725,42 +1725,12 @@ static struct l_dbus_message *ag_request_authorization_call(struct l_dbus *dbus,
                                                struct l_dbus_message *message,
                                                void *user_data)
 {
-       struct btp_gap_passkey_confirm_ev ev;
-       struct btp_device *device;
-       struct btp_adapter *adapter;
-       const char *path, *str_addr, *str_addr_type;
-       uint32_t passkey;
-
-       l_dbus_message_get_arguments(message, "ou", &path, &passkey);
-
-       device = find_device_by_path(path);
-
-       if (!l_dbus_proxy_get_property(device->proxy, "Address", "s", &str_addr)
-               || !l_dbus_proxy_get_property(device->proxy, "AddressType", "s",
-               &str_addr_type)) {
-               l_info("Cannot get device properties");
-
-               return NULL;
-       }
-
-       ev.passkey = L_CPU_TO_LE32(passkey);
-       ev.address_type = strcmp(str_addr_type, "public") ?
-                                                       BTP_GAP_ADDR_RANDOM :
-                                                       BTP_GAP_ADDR_PUBLIC;
-       if (str2ba(str_addr, &ev.address) < 0) {
-               l_info("Incorrect device address");
-
-               return NULL;
-       }
-
-       adapter = find_adapter_by_device(device);
-
-       ag.pending_req = l_dbus_message_ref(message);
+       struct l_dbus_message *reply;
 
-       btp_send(btp, BTP_GAP_SERVICE, BTP_EV_GAP_PASSKEY_CONFIRM,
-                                       adapter->index, sizeof(ev), &ev);
+       reply = l_dbus_message_new_method_return(message);
+       l_dbus_message_set_arguments(reply, "");
 
-       return NULL;
+       return reply;
 }
 
 static struct l_dbus_message *ag_authorize_service_call(struct l_dbus *dbus,