mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
setMD5 has now returns bool
handle setMD5 failed in HTTP update reset UpdaterClass when MD5 check failed see: #1244
This commit is contained in:
@ -296,7 +296,11 @@ bool ESP8266HTTPUpdate::runUpdate(Stream& in, uint32_t size, String md5, int com
|
||||
}
|
||||
|
||||
if(md5.length()) {
|
||||
Update.setMD5(md5.c_str());
|
||||
if(!Update.setMD5(md5.c_str())) {
|
||||
lastError = HTTP_UE_SERVER_FAULTY_MD5;
|
||||
DEBUG_HTTP_UPDATE("[httpUpdate] Update.setMD5 failed! (%s)\n", md5.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(Update.writeStream(in) != size) {
|
||||
|
Reference in New Issue
Block a user