summaryrefslogtreecommitdiff
path: root/tools/btgatt-client.c
diff options
context:
space:
mode:
authorArman Uguray <armansito@chromium.org>2014-12-15 07:29:06 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-12-15 17:24:14 -0200
commit1ea6892cc66302c2d3e41f90c89f3e052fb25ddc (patch)
tree32f6e4794ff113b91a250302142e7ba6eae9446d /tools/btgatt-client.c
parentebcbada186b2ec9f323064ae7a117baa0881b600 (diff)
downloadbluez-1ea6892cc66302c2d3e41f90c89f3e052fb25ddc.tar.gz
shared/att: Add err argument to disconnect cb
This patch adds an "int err" argument to the disconnect callback. shared/att obtains the value of SO_ERROR option for the underlying fd and passes it to the callbacks.
Diffstat (limited to 'tools/btgatt-client.c')
-rw-r--r--tools/btgatt-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index 015142d36..e2e053742 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -74,9 +74,9 @@ static void print_prompt(void)
fflush(stdout);
}
-static void att_disconnect_cb(void *user_data)
+static void att_disconnect_cb(int err, void *user_data)
{
- printf("Device disconnected\n");
+ printf("Device disconnected: %s\n", strerror(err));
mainloop_quit();
}