aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJayant Sane <jayant.sane@intel.com>2011-06-23 18:25:13 (GMT)
committerJouni Malinen <j@w1.fi>2011-06-23 18:25:13 (GMT)
commitc2762e410fa319f75a174aeb12343beddf99fce4 (patch)
tree05cfbcec1b55313da97fea1f7671965e925377ff /wpa_supplicant/wps_supplicant.c
parentc988980d95a8c88f81adb799a39caabe5bed1715 (diff)
downloadhostap-c2762e410fa319f75a174aeb12343beddf99fce4.zip
hostap-c2762e410fa319f75a174aeb12343beddf99fce4.tar.gz
hostap-c2762e410fa319f75a174aeb12343beddf99fce4.tar.bz2
P2P: Update D-Bus network object semantics during group formation
Do not emit network objects during P2P group formation since such network objects can confuse certain apps. Instead, a persistent group object is created to allow apps to keep track of persistent groups. Persistent group objects only represent the info needed to recreate the group. Also fixes a minor bug in the handling of persistent group objects during WPS operations. Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 778ccaf..ba59e7c 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -780,9 +780,18 @@ static void wpas_wps_reassoc(struct wpa_supplicant *wpa_s,
ssid = wpa_s->conf->ssid;
while (ssid) {
int was_disabled = ssid->disabled;
- ssid->disabled = ssid != selected;
- if (was_disabled != ssid->disabled)
- wpas_notify_network_enabled_changed(wpa_s, ssid);
+ /*
+ * In case the network object corresponds to a persistent group
+ * then do not send out network disabled signal. In addition,
+ * do not change disabled status of persistent network objects
+ * from 2 to 1 should we connect to another network.
+ */
+ if (was_disabled != 2) {
+ ssid->disabled = ssid != selected;
+ if (was_disabled != ssid->disabled)
+ wpas_notify_network_enabled_changed(wpa_s,
+ ssid);
+ }
ssid = ssid->next;
}
wpa_s->disconnected = 0;