diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-11-03 17:44:33 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-11-03 18:08:32 +0100 |
commit | e422f9a2109bc8de0ba2dc1276646037b9c1b5f7 (patch) | |
tree | 718d387e1470cfe95a840231313acf6e0a3fb635 | |
parent | fe13268d0f225ccbdf2a507cc7ee75db28b443bd (diff) | |
download | connman-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.c | 3 |
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); |