From: Somdas Bandyopadhyay Date: Sun, 1 Nov 2015 06:53:45 +0000 (+0530) Subject: Use "STATUS-NO_EVENTS" instead of "STATUS" in get_wpa_status function X-Git-Tag: hostap_2_6~1411 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcdb35928c7dcdf0b418f92f942065b26ba2845e;p=thirdparty%2Fhostap.git Use "STATUS-NO_EVENTS" instead of "STATUS" in get_wpa_status function Using "STATUS" command triggers CTRL-EVENT-STATE-CHANGE and CTRL-EVENT-CONNECTED (if connected to some AP) events. These events cause problems in Android WifiStateMachine in Marshmallow. Due to these events WifiStateMachine sometimes disconnects the OSU SSID connection, while hs20-osu-client waits for IP address. Signed-off-by: Somdas Bandyopadhyay --- diff --git a/src/common/wpa_helpers.c b/src/common/wpa_helpers.c index 28913b913..f1594213f 100644 --- a/src/common/wpa_helpers.c +++ b/src/common/wpa_helpers.c @@ -172,7 +172,8 @@ int get_wpa_status(const char *ifname, const char *field, char *obuf, if (ctrl == NULL) return -1; len = sizeof(buf); - if (wpa_ctrl_request(ctrl, "STATUS", 6, buf, &len, NULL) < 0) { + if (wpa_ctrl_request(ctrl, "STATUS-NO_EVENTS", 16, buf, &len, + NULL) < 0) { wpa_ctrl_close(ctrl); return -1; }