WPS: Add support for setting timeout for PIN
[wpasupplicant] / hostapd / wps_hostapd.c
index 15cb7a1..34fe409 100644 (file)
@@ -704,7 +704,7 @@ void hostapd_deinit_wps(struct hostapd_data *hapd)
 
 
 int hostapd_wps_add_pin(struct hostapd_data *hapd, const char *uuid,
-                       const char *pin)
+                       const char *pin, int timeout)
 {
        u8 u[UUID_LEN];
        int any = 0;
@@ -716,7 +716,8 @@ int hostapd_wps_add_pin(struct hostapd_data *hapd, const char *uuid,
        else if (uuid_str2bin(uuid, u))
                return -1;
        return wps_registrar_add_pin(hapd->wps->registrar, any ? NULL : u,
-                                    (const u8 *) pin, os_strlen(pin));
+                                    (const u8 *) pin, os_strlen(pin),
+                                    timeout);
 }
 
 
@@ -766,7 +767,8 @@ int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
        if ((wps->oob_conf.oob_method == OOB_METHOD_DEV_PWD_E ||
             wps->oob_conf.oob_method == OOB_METHOD_DEV_PWD_R) &&
            hostapd_wps_add_pin(hapd, "any",
-                               wpabuf_head(wps->oob_conf.dev_password)) < 0)
+                               wpabuf_head(wps->oob_conf.dev_password), 0) <
+           0)
                goto error;
 
        return 0;