Skip to content

Reinit updater md5 related fields for cleanup #4260

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
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions libraries/Update/src/Update.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class UpdateClass {
bool setMD5(const char * expected_md5);

/*
returns the MD5 String of the sucessfully ended firmware
returns the MD5 String of the successfully ended firmware
*/
String md5String(void){ return _md5.toString(); }

/*
populated the result with the md5 bytes of the sucessfully ended firmware
populated the result with the md5 bytes of the successfully ended firmware
*/
void md5(uint8_t * result){ return _md5.getBytes(result); }

Expand Down
2 changes: 2 additions & 0 deletions libraries/Update/src/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ bool UpdateClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) {

_reset();
_error = 0;
_target_md5 = emptyString;
_md5 = MD5Builder();

if(size == 0) {
_error = UPDATE_ERROR_SIZE;
Expand Down