diff --git a/android/a2dp.c b/android/a2dp.c
index 74d0082..a9e7c65 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
DBG("");
+ if (notification_sk >= 0)
+ return false;
+
bacpy(&adapter_addr, addr);
server = bt_io_listen(connect_cb, NULL, NULL, NULL, &err,
{
DBG("");
+ if (notification_sk < 0)
+ return;
+
notification_sk = -1;
bt_adapter_remove_record(record_id);
diff --git a/android/bluetooth.c b/android/bluetooth.c
index 7dc2ec3..11b9d76 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
{
DBG("");
+ if (notification_sk >= 0)
+ return false;
+
notification_sk = sk;
return true;
{
DBG("");
+ if (notification_sk < 0)
+ return;
+
notification_sk = -1;
}
diff --git a/android/hidhost.c b/android/hidhost.c
index 842b8ad..df21f81 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
DBG("");
+ if (notification_sk >= 0)
+ return false;
+
bacpy(&adapter_addr, addr);
ctrl_io = bt_io_listen(connect_cb, NULL, NULL, NULL, &err,
{
DBG("");
+ if (notification_sk < 0)
+ return;
+
notification_sk = -1;
if (ctrl_io) {
diff --git a/android/pan.c b/android/pan.c
index fba86b8..ada458a 100644
--- a/android/pan.c
+++ b/android/pan.c
{
DBG("");
+ if (notification_sk >= 0)
+ return false;
+
notification_sk = sk;
return true;
{
DBG("");
+ if (notification_sk < 0)
+ return;
+
notification_sk = -1;
}