From bc7b9f86c4a3f5ee3756650db3df49b9adc34520 Mon Sep 17 00:00:00 2001 From: trilader Date: Thu, 7 May 2015 15:12:57 +0200 Subject: [PATCH] Allow connecting to unsecured WiFi networks --- app/modules/wifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/wifi.c b/app/modules/wifi.c index d2b2d2e5..e9d67d0e 100644 --- a/app/modules/wifi.c +++ b/app/modules/wifi.c @@ -328,8 +328,8 @@ static int wifi_station_config( lua_State* L ) if (sl>32 || ssid == NULL) return luaL_error( L, "ssid:<32" ); const char *password = luaL_checklstring( L, 2, &pl ); - if (pl<8 || pl>64 || password == NULL) - return luaL_error( L, "pwd:8~64" ); + if (pl!=0 && (pl<8 || pl>64) || password == NULL) + return luaL_error( L, "pwd:0,8~64" ); c_memset(sta_conf.ssid, 0, 32); c_memset(sta_conf.password, 0, 64);