Skip to content
Snippets Groups Projects
Commit 11ba89f0 authored by rswindell's avatar rswindell
Browse files

Added more checks in loops for an active connection.

parent 0f6de2d2
Branches
Tags
No related merge requests found
......@@ -1500,7 +1500,10 @@ BOOL zmodem_send_file(zmodem_t* zm, char* fname, FILE* fp, BOOL request_init, ti
type = zmodem_rx_header(zm,zm->recv_timeout);
if(zm->cancelled)
return(FALSE);
} while(type == ZACK);
} while(type == ZACK && is_connected(zm));
if(!is_connected(zm))
return(FALSE);
#if 0
lprintf(zm,LOG_INFO,"type : %d",type);
......@@ -1534,6 +1537,9 @@ BOOL zmodem_send_file(zmodem_t* zm, char* fname, FILE* fp, BOOL request_init, ti
type = zmodem_send_from(zm, fp, pos, s.st_size, &sent_bytes);
if(!is_connected(zm))
return(FALSE);
if(sent!=NULL)
*sent+=sent_bytes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment