Android: Add NO_EVENTS parameter to status command
It also allows to use the STATUS command with default behavior, say for debug, i.e., don't generate a "fake" CONNECTION and SUPPLICANT_STATE_CHANGE events with the new STATUS-NO_EVENTS case. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
df2508d7a8
commit
a6ab82d7b4
1 changed files with 23 additions and 16 deletions
|
@ -1768,6 +1768,12 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
|
||||||
#endif /* CONFIG_WPS */
|
#endif /* CONFIG_WPS */
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
/*
|
||||||
|
* Allow using the STATUS command with default behavior, say for debug,
|
||||||
|
* i.e., don't generate a "fake" CONNECTION and SUPPLICANT_STATE_CHANGE
|
||||||
|
* events with STATUS-NO_EVENTS.
|
||||||
|
*/
|
||||||
|
if (os_strcmp(params, "-NO_EVENTS")) {
|
||||||
wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
|
wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
|
||||||
"id=%d state=%d BSSID=" MACSTR " SSID=%s",
|
"id=%d state=%d BSSID=" MACSTR " SSID=%s",
|
||||||
wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
|
wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
|
||||||
|
@ -1785,6 +1791,7 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
|
||||||
ssid ? ssid->id : -1,
|
ssid ? ssid->id : -1,
|
||||||
ssid && ssid->id_str ? ssid->id_str : "");
|
ssid && ssid->id_str ? ssid->id_str : "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif /* ANDROID */
|
#endif /* ANDROID */
|
||||||
|
|
||||||
return pos - buf;
|
return pos - buf;
|
||||||
|
|
Loading…
Reference in a new issue