summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-11-03 17:44:33 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2010-11-03 18:08:32 +0100
commite422f9a2109bc8de0ba2dc1276646037b9c1b5f7 (patch)
tree718d387e1470cfe95a840231313acf6e0a3fb635
parentfe13268d0f225ccbdf2a507cc7ee75db28b443bd (diff)
downloadconnman-e422f9a2109bc8de0ba2dc1276646037b9c1b5f7.tar.gz
connman-e422f9a2109bc8de0ba2dc1276646037b9c1b5f7.tar.bz2
connman-e422f9a2109bc8de0ba2dc1276646037b9c1b5f7.zip
supplicant: Check for network before removing it
When disconnecting by removing a network, check that the targeted network is the one currently set.
-rw-r--r--plugins/supplicant.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index 469e109f..f0d1a4ff 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -2538,6 +2538,9 @@ int supplicant_disconnect(struct connman_network *network)
if (task->disconnecting == TRUE)
return -EALREADY;
+ if (task->network != network)
+ return -EINVAL;
+
remove_network(task);
disconnect_network(task);