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

Fix potential infinite (while connected) wait for ZEOF or ZFIN from sender in

zmodem_recv_header_and_check(), a TIMEOUT (no input) would not stop
the loop.
parent 9f598bc5
No related branches found
No related tags found
No related merge requests found
......@@ -1291,7 +1291,7 @@ int zmodem_recv_header_and_check(zmodem_t* zm)
while(is_connected(zm) && !is_cancelled(zm)) {
type = zmodem_recv_header_raw(zm,TRUE);
if(type != INVHDR && (type&BADSUBPKT) == 0) {
if(type != INVHDR && ((type&BADSUBPKT) == 0 || type==TIMEOUT)) {
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment