From: Daichi Ueura Date: Tue, 1 Mar 2016 18:26:38 +0000 (+0900) Subject: HS 2.0R2: Clear fetch_anqp_in_progress if fopen fails X-Git-Tag: hostap_2_6~771 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf8d181c38fd3ca7a695ce169d7349914eab0c5;p=thirdparty%2Fhostap.git HS 2.0R2: Clear fetch_anqp_in_progress if fopen fails Clear wpa_s->fetch_anqp_in_progress when osu-providers.txt can't be opened. An issue happens, for instance, when wpa_supplicant doesn't have correct access permission to the directory specified by osu_dir. If hs20_osu_fetch_done method returns without clearing the flag, 'FETCH_OSU' command will never work correctly. Signed-off-by: Daichi Ueura --- diff --git a/wpa_supplicant/hs20_supplicant.c b/wpa_supplicant/hs20_supplicant.c index 57b994367..3128fcb34 100644 --- a/wpa_supplicant/hs20_supplicant.c +++ b/wpa_supplicant/hs20_supplicant.c @@ -664,6 +664,7 @@ static void hs20_osu_fetch_done(struct wpa_supplicant *wpa_s) f = fopen(fname, "w"); if (f == NULL) { hs20_free_osu_prov(wpa_s); + wpa_s->fetch_anqp_in_progress = 0; return; }