use realloc() when increasing the size of _params. addParameter() now returns bool

indicating the status of adding the parameter where false indicates it failed to
increase the size of _params and did not add the parameter.
This commit is contained in:
Christopher Liebman
2017-12-09 06:04:07 -08:00
parent 0b6341bea4
commit d66cd47df8
2 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -100,8 +100,8 @@ class WiFiManager
void setAPCallback( void (*func)(WiFiManager*) );
//called when settings have been changed and connection was successful
void setSaveConfigCallback( void (*func)(void) );
//adds a custom parameter
void addParameter(WiFiManagerParameter *p);
//adds a custom parameter, returns false on failure
bool addParameter(WiFiManagerParameter *p);
//if this is set, it will exit after config, even if connection is unsuccessful.
void setBreakAfterConfig(boolean shouldBreak);
//if this is set, try WPS setup when starting (this will delay config portal for up to 2 mins)