Add option for overriding scan result handler for a single scan
This commit is contained in:
parent
087f0254d7
commit
64e58f5189
2 changed files with 10 additions and 0 deletions
|
@ -899,6 +899,13 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wpa_s->scan_res_handler) {
|
||||||
|
wpa_s->scan_res_handler(wpa_s, scan_res);
|
||||||
|
wpa_s->scan_res_handler = NULL;
|
||||||
|
wpa_scan_results_free(scan_res);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't post the results if this was the initial cached
|
* Don't post the results if this was the initial cached
|
||||||
* and there were no results.
|
* and there were no results.
|
||||||
|
|
|
@ -33,6 +33,7 @@ struct wpa_supplicant;
|
||||||
struct ibss_rsn;
|
struct ibss_rsn;
|
||||||
struct scan_info;
|
struct scan_info;
|
||||||
struct wpa_bss;
|
struct wpa_bss;
|
||||||
|
struct wpa_scan_results;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Forward declarations of private structures used within the ctrl_iface
|
* Forward declarations of private structures used within the ctrl_iface
|
||||||
|
@ -343,6 +344,8 @@ struct wpa_supplicant {
|
||||||
*/
|
*/
|
||||||
#define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1)
|
#define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1)
|
||||||
|
|
||||||
|
void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
|
||||||
|
struct wpa_scan_results *scan_res);
|
||||||
struct dl_list bss; /* struct wpa_bss::list */
|
struct dl_list bss; /* struct wpa_bss::list */
|
||||||
struct dl_list bss_id; /* struct wpa_bss::list_id */
|
struct dl_list bss_id; /* struct wpa_bss::list_id */
|
||||||
size_t num_bss;
|
size_t num_bss;
|
||||||
|
|
Loading…
Reference in a new issue