From: Samuel Ortiz Date: Wed, 3 Nov 2010 16:44:33 +0000 (+0100) Subject: supplicant: Check for network before removing it X-Git-Tag: 2.0_alpha~2202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e422f9a2109bc8de0ba2dc1276646037b9c1b5f7;p=framework%2Fconnectivity%2Fconnman.git supplicant: Check for network before removing it When disconnecting by removing a network, check that the targeted network is the one currently set. --- diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 469e109..f0d1a4f 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);