8000 Update ESP8266HTTPUpdateServer library by dav1901 · Pull Request #5297 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Update ESP8266HTTPUpdateServer library #5297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 13, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Converted C type strings to String object
  • Loading branch information
dav1901 authored Oct 30, 2018
commit cc542ec2389bbb6cda70583036aca443813bfb5f
20 changes: 10 additions & 10 deletions libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.h
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ class ESP8266HTTPUpdateServer

void setup(ESP8266WebServer *server)
{
setup(server, NULL, NULL);
setup(server, emptyString, emptyString);
}

void setup(ESP8266WebServer *server, const char * path)
void setup(ESP8266WebServer *server, const String& path)
{
setup(server, path, NULL, NULL);
setup(server, path, emptyString, emptyString);
}

void setup(ESP8266WebServer *server, const char * username, const char * password)
void setup(ESP8266WebServer *server, const String& username, const String& password)
{
setup(server, "/update", username, password);
}

void setup(ESP8266WebServer *server, const char * path, const char * username, const char * password);
void setup(ESP8266WebServer *server, const String& path, const String& username, const String& password);

void updateCredentials(const char * username, const char * password)
void updateCredentials(const String& username, const String& password)
{
_username = (char *)username;
_password = (char *)password;
_username = username;
_password = password;
}

protected:
Expand All @@ -37,8 +37,8 @@ class ESP8266HTTPUpdateServer
private:
bool _serial_output;
ESP8266WebServer *_server;
char * _username;
char * _password;
String _username;
String _password;
bool _authenticated;
String _updaterError;
};
Expand Down
0