From 2dc422e2b331dfe8214bf945709c4ec605b1f48b Mon Sep 17 00:00:00 2001 From: Max Stepanov Date: Mon, 16 Mar 2015 01:16:56 -0400 Subject: [PATCH] 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 --- wpa_supplicant/p2p_supplicant_sd.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant_sd.c b/wpa_supplicant/p2p_supplicant_sd.c index cb68c03bb..54af4b6b2 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; }