Skip to content
Snippets Groups Projects
Commit 3b2b7f1b authored by rswindell's avatar rswindell
Browse files

zmodem_send_from() returns TIMEOUT if zmode_send_data() returns non-zero.

parent 7e8a4316
No related branches found
No related tags found
No related merge requests found
...@@ -1383,7 +1383,8 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong* sent) ...@@ -1383,7 +1383,8 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong* sent)
if((ulong)ftell(fp) >= zm->current_file_size || n==0) // can't use feof() here! if((ulong)ftell(fp) >= zm->current_file_size || n==0) // can't use feof() here!
type = ZCRCE; type = ZCRCE;
zmodem_send_data(zm, type, zm->tx_data_subpacket, n); if(zmodem_send_data(zm, type, zm->tx_data_subpacket, n)!=0)
return(TIMEOUT);
if(sent!=NULL) if(sent!=NULL)
*sent+=n; *sent+=n;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment