summaryrefslogtreecommitdiff
path: root/profiles/sap
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2012-09-28 18:32:23 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-10-01 17:28:22 +0300
commit5381d021f3a1d63267273bb8b6b90772b01fa302 (patch)
tree045ee8ee6613f1f79a539943430207a005ba15a3 /profiles/sap
parent127d871ed881ec690baded8fc607acfec886479a (diff)
downloadbluez-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/sap')
-rw-r--r--profiles/sap/server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/profiles/sap/server.c b/profiles/sap/server.c
index 6c5aa21ab..607243285 100644
--- a/profiles/sap/server.c
+++ b/profiles/sap/server.c
@@ -1213,7 +1213,7 @@ static void connect_confirm_cb(GIOChannel *io, gpointer data)
GError *gerr = NULL;
bdaddr_t src, dst;
char dstaddr[18];
- int err;
+ guint ret;
DBG("conn %p io %p", conn, io);
@@ -1253,10 +1253,10 @@ static void connect_confirm_cb(GIOChannel *io, gpointer data)
ba2str(&dst, dstaddr);
- err = btd_request_authorization(&src, &dst, SAP_UUID, connect_auth_cb,
+ ret = btd_request_authorization(&src, &dst, SAP_UUID, connect_auth_cb,
server);
- if (err < 0) {
- error("Authorization failure (err %d)", err);
+ if (ret == 0) {
+ error("Authorization failure");
sap_server_remove_conn(server);
return;
}