aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <paulo.alcantara@openbossa.org>2012-06-05 20:46:01 -0300
committerPaulo Alcantara <paulo.alcantara@openbossa.org>2012-06-06 20:27:17 -0300
commit43637cbf8e8ad8b34ac72557f461d3f0bbb1c400 (patch)
tree911e9509154bf469f784d7dfe62bb79d74619040
parente61b97db8aa1b569ff63134371debb5aa34adc34 (diff)
downloadbluez-bugfix.tar.gz
bluez-bugfix.tar.xz
bluez-bugfix.zip
device: Disable auto connections when "PIN or key missing"bugfix
-rw-r--r--src/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 0c1ba877..1f227178 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1970,6 +1970,12 @@ static void att_error_cb(const GError *gerr, gpointer user_data)
{
struct att_callbacks *attcb = user_data;
struct btd_device *device = attcb->user_data;
+ int err = gerr->code;
+
+ DBG("err %d", err);
+
+ if (err == EBADE)
+ return;
if (device->auto_connect == FALSE)
return;