aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/gas_query.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-29 22:07:50 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-29 22:08:40 (GMT)
commit1866dfb52c5abb38275dc11f08dc8a453d57652b (patch)
treef345e8f950c0335dc47047a7f87d8feb55957030 /wpa_supplicant/gas_query.c
parentf981ce7298e6cf6fe1480605e53255edaf72dd26 (diff)
downloadhostap-1866dfb52c5abb38275dc11f08dc8a453d57652b.zip
hostap-1866dfb52c5abb38275dc11f08dc8a453d57652b.tar.gz
hostap-1866dfb52c5abb38275dc11f08dc8a453d57652b.tar.bz2
DPP: Stop pending GAS client operation on DPP_STOP_LISTEN
This makes the operation more complete in stopping all ongoing DPP related functionality. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/gas_query.c')
-rw-r--r--wpa_supplicant/gas_query.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/wpa_supplicant/gas_query.c b/wpa_supplicant/gas_query.c
index 91cf19a..e4c3b1b 100644
--- a/wpa_supplicant/gas_query.c
+++ b/wpa_supplicant/gas_query.c
@@ -121,6 +121,8 @@ static const char * gas_result_txt(enum gas_query_result result)
return "PEER_ERROR";
case GAS_QUERY_INTERNAL_ERROR:
return "INTERNAL_ERROR";
+ case GAS_QUERY_STOPPED:
+ return "STOPPED";
case GAS_QUERY_DELETED_AT_DEINIT:
return "DELETED_AT_DEINIT";
}
@@ -852,3 +854,18 @@ int gas_query_req(struct gas_query *gas, const u8 *dst, int freq,
return dialog_token;
}
+
+
+int gas_query_stop(struct gas_query *gas, u8 dialog_token)
+{
+ struct gas_query_pending *query;
+
+ dl_list_for_each(query, &gas->pending, struct gas_query_pending, list) {
+ if (query->dialog_token == dialog_token) {
+ gas_query_done(gas, query, GAS_QUERY_STOPPED);
+ return 0;
+ }
+ }
+
+ return -1;
+}