Skip to content
Merged
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
7 changes: 7 additions & 0 deletions src/WiFiStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class WiFiStorageClass
return true;
}
static bool downloadOTA(const char * url, uint8_t * res_ota_download = NULL) {
/* The buffer within the nina firmware allows a maximum
* url size of 128 bytes. It's better to prevent the
* transmission of over-sized URL as soon as possible.
*/
if (strlen(url) > 128)
return false;

uint8_t const res = WiFiDrv::downloadOTA(url, strlen(url));
if (res_ota_download)
*res_ota_download = res;
Expand Down