diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-12-28 13:14:58 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-12-28 13:14:58 +0200 |
commit | cd7d80f37303802293ef36518e8643382c5166a4 (patch) | |
tree | 4b6b67a230c7a38eb739c417c18c294e29df066d /src/ap/drv_callbacks.c | |
parent | 1c08f8c0f090257c607e7b89f754b4f9a57c9f55 (diff) | |
download | external_wpa_supplicant_8_ti-cd7d80f37303802293ef36518e8643382c5166a4.zip external_wpa_supplicant_8_ti-cd7d80f37303802293ef36518e8643382c5166a4.tar.gz external_wpa_supplicant_8_ti-cd7d80f37303802293ef36518e8643382c5166a4.tar.bz2 |
Allow Probe Request callbacks to terminate iteration
Diffstat (limited to 'src/ap/drv_callbacks.c')
-rw-r--r-- | src/ap/drv_callbacks.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index ed71d20..30d87a8 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -378,12 +378,18 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event, #endif /* HOSTAPD */ -void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, +int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *ie, size_t ie_len) { size_t i; + int ret = 0; - for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++) - hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx, - sa, ie, ie_len); + for (i = 0; hapd->probereq_cb && i < hapd->num_probereq_cb; i++) { + if (hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx, + sa, ie, ie_len) > 0) { + ret = 1; + break; + } + } + return ret; } |