OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0504220
)
core: Disable unnecessary auto connections
author
Paulo Alcantara
<paulo.alcantara@openbossa.org>
Tue, 2 Oct 2012 17:22:55 +0000
(14:22 -0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Wed, 3 Oct 2012 07:50:54 +0000
(10:50 +0300)
BlueZ host disconnects the link when encryption fails. ECONNABORTED
error is returned by the kernel when the connection is terminated by the
local host. This scenario commonly happens when authentication fails due
PIN or Key Missing.
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
7221f93
..
d28adeb
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-2044,6
+2044,9
@@
static void att_error_cb(const GError *gerr, gpointer user_data)
struct att_callbacks *attcb = user_data;
struct btd_device *device = attcb->user_data;
+ if (g_error_matches(gerr, BT_IO_ERROR, ECONNABORTED))
+ return;
+
if (device->auto_connect == FALSE)
return;