Skip to content

Commit

Permalink
Merge pull request #1880 from sauttefk/master
Browse files Browse the repository at this point in the history
Re-enable old behaviour if passphrase string is empty
  • Loading branch information
igrr committed Apr 13, 2016
2 parents 2730ee0 + 4684e44 commit fa7e903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int ch
return false;
}

if(!ssid || *ssid == 0 || strlen(ssid) > 31) {
if(!ssid || strlen(ssid) == 0 || strlen(ssid) > 31) {
// fail SSID too long or missing!
DEBUG_WIFI("[AP] SSID too long or missing!\n");
return false;
}

if(passphrase && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) {
if(passphrase && strlen(passphrase) > 0 && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) {
// fail passphrase to long or short!
DEBUG_WIFI("[AP] fail passphrase to long or short!\n");
return false;
Expand Down

0 comments on commit fa7e903

Please sign in to comment.