summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-15 14:56:19 (GMT)
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-17 10:33:50 (GMT)
commit038d71d7e27da9e3722dd4518af253168197ebca (patch)
tree5137f937093e34d1d1fd4d53dea6c18f27b1223d
parent6e3436df89f8293c60ef750a6e442f1203f56d40 (diff)
downloadconnman-038d71d7e27da9e3722dd4518af253168197ebca.zip
connman-038d71d7e27da9e3722dd4518af253168197ebca.tar.gz
connman-038d71d7e27da9e3722dd4518af253168197ebca.tar.bz2
[SPIN] Check if network is already removed in connect callback.refs/changes/11/74711/2
Change-Id: I6b7916473347bba2b93d1565d59c95eaca0d2190 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rwxr-xr-xplugins/bluetooth.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 24f3aa5..f72a4af 100755
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -217,6 +217,18 @@ static void pan_connect_cb(DBusMessage *message, void *user_data)
return;
}
+#ifdef TIZEN_EXT
+ /*
+ * Network could be removed because of BT adapter power off
+ * This is to handle the scenario where network is removed
+ * before the connect_cb is called
+ */
+ if (!pan->network) {
+ DBG("network already removed");
+ return;
+ }
+#endif
+
if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_ERROR) {
const char *dbus_error = dbus_message_get_error_name(message);
@@ -535,7 +547,10 @@ static void device_enable_cb(const DBusError *error, void *user_data)
goto out;
}
+#if !defined TIZEN_EXT
enable_device(device, path);
+#endif
+
out:
g_free(path);
}
@@ -602,7 +617,9 @@ static void device_disable_cb(const DBusError *error, void *user_data)
goto out;
}
+#if !defined TIZEN_EXT
disable_device(device, path);
+#endif
out:
g_free(path);