|
|
@ -101,13 +101,14 @@ downloadHandler(void* parameter, uint8_t* buffer, uint32_t bytesRead)
|
|
|
|
|
|
|
|
|
|
|
|
printf("received %i bytes\n", bytesRead);
|
|
|
|
printf("received %i bytes\n", bytesRead);
|
|
|
|
|
|
|
|
|
|
|
|
if (fwrite(buffer, bytesRead, 1, fp) == 1)
|
|
|
|
if (bytesRead > 0) {
|
|
|
|
return true;
|
|
|
|
if (fwrite(buffer, bytesRead, 1, fp) == 1)
|
|
|
|
else {
|
|
|
|
return true;
|
|
|
|
printf("Failed to write local file!\n");
|
|
|
|
else {
|
|
|
|
return false;
|
|
|
|
printf("Failed to write local file!\n");
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|