Link to, and adjust types for, the PCSC framework included with OSX
[mech_eap.git] / wpa_supplicant / hs20_supplicant.c
index a82d84b..e88f147 100644 (file)
@@ -703,6 +703,8 @@ static void hs20_osu_fetch_done(struct wpa_supplicant *wpa_s)
                 wpa_s->conf->osu_dir);
        f = fopen(fname, "w");
        if (f == NULL) {
+               wpa_msg(wpa_s, MSG_INFO,
+                       "Could not write OSU provider information");
                hs20_free_osu_prov(wpa_s);
                wpa_s->fetch_anqp_in_progress = 0;
                return;
@@ -1076,7 +1078,7 @@ static void hs20_osu_scan_res_handler(struct wpa_supplicant *wpa_s,
 }
 
 
-int hs20_fetch_osu(struct wpa_supplicant *wpa_s)
+int hs20_fetch_osu(struct wpa_supplicant *wpa_s, int skip_scan)
 {
        if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) {
                wpa_printf(MSG_DEBUG, "HS 2.0: Cannot start fetch_osu - "
@@ -1107,7 +1109,16 @@ int hs20_fetch_osu(struct wpa_supplicant *wpa_s)
        wpa_msg(wpa_s, MSG_INFO, "Starting OSU provisioning information fetch");
        wpa_s->num_osu_scans = 0;
        wpa_s->num_prov_found = 0;
-       hs20_start_osu_scan(wpa_s);
+       if (skip_scan) {
+               wpa_s->network_select = 0;
+               wpa_s->fetch_all_anqp = 1;
+               wpa_s->fetch_osu_info = 1;
+               wpa_s->fetch_osu_icon_in_progress = 0;
+
+               interworking_start_fetch_anqp(wpa_s);
+       } else {
+               hs20_start_osu_scan(wpa_s);
+       }
 
        return 0;
 }