Skip to content
Snippets Groups Projects
Commit 148dcb9a authored by rswindell's avatar rswindell
Browse files

zmodem_send_from() checks the "cancelled" flag more frequently.

parent 893756a7
Branches
Tags
No related merge requests found
...@@ -1352,7 +1352,7 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent ...@@ -1352,7 +1352,7 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent
* check out that header * check out that header
*/ */
while(zmodem_rx_poll(zm)) { while(zmodem_rx_poll(zm) && !zm->cancelled) {
int type; int type;
int c; int c;
if((c = zmodem_rx_raw(zm, zm->send_timeout)) < 0) if((c = zmodem_rx_raw(zm, zm->send_timeout)) < 0)
...@@ -1363,12 +1363,11 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent ...@@ -1363,12 +1363,11 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent
return type; return type;
} }
} }
}
if(zm->cancelled) if(zm->cancelled)
return(-1); return(-1);
} }
}
/* /*
* end of file reached. * end of file reached.
* should receive something... so fake ZACK * should receive something... so fake ZACK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment