TFTP
Forgot to reset the offset to 0 when opening a custom file
This commit is contained in:
@@ -99,6 +99,7 @@ void* tftp_open(const char* fname, const char* mode, u8_t write) {
|
||||
LOG_INFO(TAG, "Opening %s", fname);
|
||||
|
||||
if (strcmp(fname, virt_file[0].name) == 0 && write == TFTP_READ) {
|
||||
tftp_custom_fseek(&virt_file[0], 0, SEEK_SET);
|
||||
return &virt_file[0];
|
||||
} else if (strcmp(fname, virt_file[1].name) == 0 && write != TFTP_READ) {
|
||||
return &virt_file[1];
|
||||
|
||||
Reference in New Issue
Block a user