Message ID | 2C2F1EBA8050E74EA81502D5740B4BD6BBBCBAB63C@SJEXCHCCR02.corp.ad.broadcom.com |
---|---|
State | Accepted |
Commit | 653c4893be17d12ef7bc6e941b765c92c1e4a161 |
Headers | show |
On Sun, Dec 18, 2011 at 10:33:50PM -0800, Neeraj Kumar Garg wrote:
> Is it possible to add events like AP-STA-CONNECTED and DISCONNECTED events to a running wpa_cli with -a option. This is needed purely for test purposes for automation. Plz let me know if below patch is OK.
I guess this could be used for other purposes, too, than just testing,
but anyway, sure, this can be added. Applied.
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 42c81cd..6ca7939 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -3292,6 +3292,10 @@ static void wpa_cli_action_process(const char *msg) wpa_cli_exec(action_file, ctrl_ifname, pos); } else if (str_match(pos, WPS_EVENT_FAIL)) { wpa_cli_exec(action_file, ctrl_ifname, pos); + } else if (str_match(pos, AP_STA_CONNECTED)) { + wpa_cli_exec(action_file, ctrl_ifname, pos); + } else if (str_match(pos, AP_STA_DISCONNECTED)) { + wpa_cli_exec(action_file, ctrl_ifname, pos); } else if (str_match(pos, WPA_EVENT_TERMINATING)) { printf("wpa_supplicant is terminating - stop monitoring\n"); wpa_cli_quit = 1;