From: Jouni Malinen Date: Sat, 31 Aug 2013 13:44:42 +0000 (+0300) Subject: D-Bus: Do not send network notification for all P2P groups X-Git-Tag: aosp-kk-from-upstream~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=447969e034cbcdb9d2c686f7393f2fbeb69319b2;p=thirdparty%2Fhostap.git D-Bus: Do not send network notification for all P2P groups Previously, network added event was skipping during group formation. However, this did not necessarily catch all cases of temporary P2P network blocks. Check ssid->p2p_group to make this behavior more consistent by avoiding all P2P groups. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c index 35a029f24..40cffdfff 100644 --- a/wpa_supplicant/notify.c +++ b/wpa_supplicant/notify.c @@ -222,7 +222,7 @@ void wpas_notify_network_added(struct wpa_supplicant *wpa_s, * applications since these network objects won't behave like * regular ones. */ - if (wpa_s->global->p2p_group_formation != wpa_s) + if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s) wpas_dbus_register_network(wpa_s, ssid); } @@ -250,7 +250,7 @@ void wpas_notify_network_removed(struct wpa_supplicant *wpa_s, { if (wpa_s->wpa) wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid); - if (wpa_s->global->p2p_group_formation != wpa_s) + if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s) wpas_dbus_unregister_network(wpa_s, ssid->id); #ifdef CONFIG_P2P wpas_p2p_network_removed(wpa_s, ssid);