fix bug of client_example_files example.

pull/11/head
yiqifeiyang 9 years ago
parent 9dc1a36568
commit 71bfe4e4fd

@ -29,6 +29,7 @@ downloadHandler(void* parameter, uint8_t* buffer, uint32_t bytesRead)
if (bufferPosition + bytesRead < MAX_BUFFER_SIZE) {
memcpy(downloadBuffer + bufferPosition, buffer, bytesRead);
bufferPosition = bufferPosition + bytesRead;
return true;
}
else
@ -81,7 +82,8 @@ int main(int argc, char** argv) {
directoryEntry = LinkedList_getNext(directoryEntry);
}
bufferPosition = 0;
/* Download a file from the server */
IedConnection_getFile(con, &error, "IEDSERVER.BIN", downloadHandler, NULL);

Loading…
Cancel
Save