aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant_i.h
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-04-29 17:48:07 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-29 17:52:22 (GMT)
commit5aeebc48e8449e39a8ad0f2f1c525464ad94e837 (patch)
tree48fedd7a07364d72397ec50ea43815219e147fb3 /wpa_supplicant/wpa_supplicant_i.h
parent5441da2beb99c67e4f7790b114c65a2cc748f166 (diff)
downloadhostap-5aeebc48e8449e39a8ad0f2f1c525464ad94e837.zip
hostap-5aeebc48e8449e39a8ad0f2f1c525464ad94e837.tar.gz
hostap-5aeebc48e8449e39a8ad0f2f1c525464ad94e837.tar.bz2
D-Bus Fix network_is_persistent_group() for P2P operations
Commit c2762e410fa319f75a174aeb12343beddf99fce4 ('P2P: Update D-Bus network object semantics during group formation') added this helper function to determine whether a network block is used for storing a persistent group information. However, it implemented this in a way that matches both persistent group storage and an operating persist group instance. This does not seem to match the expected behavior for the D-Bus objects, so fix this to match only the persistent group storage case to avoid registering/unregistered incorrect D-Bus objects for groups. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant_i.h')
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 8ed8b72..364ba19 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -1118,13 +1118,13 @@ struct wpa_bss * wpa_supplicant_pick_network(struct wpa_supplicant *wpa_s,
int eap_register_methods(void);
/**
- * Utility method to tell if a given network is a persistent group
+ * Utility method to tell if a given network is for persistent group storage
* @ssid: Network object
* Returns: 1 if network is a persistent group, 0 otherwise
*/
static inline int network_is_persistent_group(struct wpa_ssid *ssid)
{
- return ((ssid->disabled == 2) || ssid->p2p_persistent_group);
+ return ssid->disabled == 2 && ssid->p2p_persistent_group;
}
int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);