aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-01-04 11:18:26 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-04 11:19:20 (GMT)
commit19c3a9a88dbfafe5dd69505f135fa4f7b663e815 (patch)
tree566637c885db68bde4b819bb3dc8bb4143af5c6d /wpa_supplicant
parent69dc9cabccb9c72b910bc123831324e6ae59d165 (diff)
downloadhostap-19c3a9a88dbfafe5dd69505f135fa4f7b663e815.zip
hostap-19c3a9a88dbfafe5dd69505f135fa4f7b663e815.tar.gz
hostap-19c3a9a88dbfafe5dd69505f135fa4f7b663e815.tar.bz2
P2PS: Notify D-Bus about removal of a stale/empty persistent group
During P2PS PD Request processing wpa_supplicant removes stale and empty persistent groups, but it did not notify D-Bus to unregister object. Fix this by adding the missing notifications. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 88eb4e0..b549103 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -4045,6 +4045,11 @@ static void wpas_p2ps_prov_complete(void *ctx, u8 status, const u8 *dev,
if (persistent_go && !persistent_go->num_p2p_clients) {
/* remove empty persistent GO */
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "P2P: Remove empty persistent group id=%d",
+ persistent_go->id);
+ wpas_notify_persistent_group_removed(wpa_s,
+ persistent_go);
wpa_config_remove_network(wpa_s->conf,
persistent_go->id);
}
@@ -4085,6 +4090,10 @@ static void wpas_p2ps_prov_complete(void *ctx, u8 status, const u8 *dev,
/* Remove stale persistent group */
if (stale->mode != WPAS_MODE_P2P_GO ||
stale->num_p2p_clients <= 1) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "P2P: Remove stale persistent group id=%d",
+ stale->id);
+ wpas_notify_persistent_group_removed(wpa_s, stale);
wpa_config_remove_network(wpa_s->conf, stale->id);
} else {
size_t i;
@@ -4117,6 +4126,11 @@ static void wpas_p2ps_prov_complete(void *ctx, u8 status, const u8 *dev,
if (persistent_go && s != persistent_go &&
!persistent_go->num_p2p_clients) {
/* remove empty persistent GO */
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "P2P: Remove empty persistent group id=%d",
+ persistent_go->id);
+ wpas_notify_persistent_group_removed(wpa_s,
+ persistent_go);
wpa_config_remove_network(wpa_s->conf,
persistent_go->id);
/* Save config */
@@ -4224,6 +4238,10 @@ static void wpas_p2ps_prov_complete(void *ctx, u8 status, const u8 *dev,
if (persistent_go && !persistent_go->num_p2p_clients) {
/* remove empty persistent GO */
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "P2P: Remove empty persistent group id=%d",
+ persistent_go->id);
+ wpas_notify_persistent_group_removed(wpa_s, persistent_go);
wpa_config_remove_network(wpa_s->conf, persistent_go->id);
}