P2PS: Delete ASP advertisements on wpas_p2p_service_flush

Delete all ASP serice advertisement on wpas_p2p_service_flush similarly
to Bonjour and UPnP services.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
This commit is contained in:
Max Stepanov 2015-03-16 01:16:57 -04:00 committed by Jouni Malinen
parent 2dc422e2b3
commit c40a8918ec
4 changed files with 29 additions and 9 deletions

View file

@ -93,6 +93,7 @@ int wpas_p2p_service_add_asp(struct wpa_supplicant *wpa_s, int auto_accept,
u32 adv_id, const char *adv_str, u8 svc_state,
u16 config_methods, const char *svc_info);
int wpas_p2p_service_del_asp(struct wpa_supplicant *wpa_s, u32 adv_id);
void wpas_p2p_service_flush_asp(struct wpa_supplicant *wpa_s);
int wpas_p2p_service_p2ps_id_exists(struct wpa_supplicant *wpa_s, u32 adv_id);
void wpas_sd_request(void *ctx, int freq, const u8 *sa, u8 dialog_token,
u16 update_indic, const u8 *tlvs, size_t tlvs_len);

View file

@ -1136,6 +1136,7 @@ void wpas_p2p_service_flush(struct wpa_supplicant *wpa_s)
struct p2p_srv_upnp, list)
wpas_p2p_srv_upnp_free(usrv);
wpas_p2p_service_flush_asp(wpa_s);
wpas_p2p_sd_service_update(wpa_s);
}
@ -1179,6 +1180,12 @@ int wpas_p2p_service_add_asp(struct wpa_supplicant *wpa_s,
}
void wpas_p2p_service_flush_asp(struct wpa_supplicant *wpa_s)
{
p2p_service_flush_asp(wpa_s->global->p2p);
}
int wpas_p2p_service_add_bonjour(struct wpa_supplicant *wpa_s,
struct wpabuf *query, struct wpabuf *resp)
{