Skip to content

Commit 0957776

Browse files
authored
Reinit updater md5 related fields (#4260)
MD5 cleanup on begin Typos
1 parent d93245d commit 0957776

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: libraries/Update/src/Update.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ class UpdateClass {
9090
bool setMD5(const char * expected_md5);
9191

9292
/*
93-
returns the MD5 String of the sucessfully ended firmware
93+
returns the MD5 String of the successfully ended firmware
9494
*/
9595
String md5String(void){ return _md5.toString(); }
9696

9797
/*
98-
populated the result with the md5 bytes of the sucessfully ended firmware
98+
populated the result with the md5 bytes of the successfully ended firmware
9999
*/
100100
void md5(uint8_t * result){ return _md5.getBytes(result); }
101101

Diff for: libraries/Update/src/Updater.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ bool UpdateClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) {
115115

116116
_reset();
117117
_error = 0;
118+
_target_md5 = emptyString;
119+
_md5 = MD5Builder();
118120

119121
if(size == 0) {
120122
_error = UPDATE_ERROR_SIZE;

0 commit comments

Comments
 (0)