diff options
author | Mikel Astiz <mikel.astiz@bmw-carit.de> | 2012-09-28 18:32:23 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-10-01 17:28:22 +0300 |
commit | 5381d021f3a1d63267273bb8b6b90772b01fa302 (patch) | |
tree | 045ee8ee6613f1f79a539943430207a005ba15a3 /profiles/input/server.c | |
parent | 127d871ed881ec690baded8fc607acfec886479a (diff) | |
download | bluez-5381d021f3a1d63267273bb8b6b90772b01fa302.tar.gz |
adapter: Use authorization id for cancelling
Return a request id in btd_request_authorization() in order to be used
when the request needs to be cancelled. This id alone will be enough to
use btd_cancel_authorization().
Diffstat (limited to 'profiles/input/server.c')
-rw-r--r-- | profiles/input/server.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/profiles/input/server.c b/profiles/input/server.c index f71fdc0d6..eaf3b6a85 100644 --- a/profiles/input/server.c +++ b/profiles/input/server.c @@ -154,7 +154,7 @@ static void confirm_event_cb(GIOChannel *chan, gpointer user_data) bdaddr_t src, dst; GError *err = NULL; char addr[18]; - int ret; + guint ret; bt_io_get(chan, &err, BT_IO_OPT_SOURCE_BDADDR, &src, @@ -179,12 +179,11 @@ static void confirm_event_cb(GIOChannel *chan, gpointer user_data) ret = btd_request_authorization(&src, &dst, HID_UUID, auth_callback, server); - if (ret == 0) + if (ret != 0) return; ba2str(&src, addr); - error("input: authorization for %s failed: %s (%d)", - addr, strerror(-ret), -ret); + error("input: authorization for %s failed", addr); g_io_channel_unref(server->confirm); server->confirm = NULL; |