aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant_sd.c
diff options
context:
space:
mode:
authorMax Stepanov <Max.Stepanov@intel.com>2015-03-16 05:16:56 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-20 13:56:59 (GMT)
commit2dc422e2b331dfe8214bf945709c4ec605b1f48b (patch)
tree35c3aa1913995cd4c2229976ae723f372535280b /wpa_supplicant/p2p_supplicant_sd.c
parent030a3e12dad1ff0e987e92ac3b362e851f736031 (diff)
downloadhostap-2dc422e2b331dfe8214bf945709c4ec605b1f48b.zip
hostap-2dc422e2b331dfe8214bf945709c4ec605b1f48b.tar.gz
hostap-2dc422e2b331dfe8214bf945709c4ec605b1f48b.tar.bz2
P2PS: Update SD indicator value on ASP add/del/update
Update a service update indicator value on ASP service advertisement add/del/update operations. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant_sd.c')
-rw-r--r--wpa_supplicant/p2p_supplicant_sd.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/wpa_supplicant/p2p_supplicant_sd.c b/wpa_supplicant/p2p_supplicant_sd.c
index cb68c03..54af4b6 100644
--- a/wpa_supplicant/p2p_supplicant_sd.c
+++ b/wpa_supplicant/p2p_supplicant_sd.c
@@ -1154,7 +1154,12 @@ int wpas_p2p_service_p2ps_id_exists(struct wpa_supplicant *wpa_s, u32 adv_id)
int wpas_p2p_service_del_asp(struct wpa_supplicant *wpa_s, u32 adv_id)
{
- return p2p_service_del_asp(wpa_s->global->p2p, adv_id);
+ int ret;
+
+ ret = p2p_service_del_asp(wpa_s->global->p2p, adv_id);
+ if (ret == 0)
+ wpas_p2p_sd_service_update(wpa_s);
+ return ret;
}
@@ -1163,9 +1168,14 @@ int wpas_p2p_service_add_asp(struct wpa_supplicant *wpa_s,
const char *adv_str, u8 svc_state,
u16 config_methods, const char *svc_info)
{
- return p2p_service_add_asp(wpa_s->global->p2p, auto_accept, adv_id,
- adv_str, svc_state, config_methods,
- svc_info);
+ int ret;
+
+ ret = p2p_service_add_asp(wpa_s->global->p2p, auto_accept, adv_id,
+ adv_str, svc_state, config_methods,
+ svc_info);
+ if (ret == 0)
+ wpas_p2p_sd_service_update(wpa_s);
+ return ret;
}