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

Added more checks of is_connected().

parent d80f25af
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ void xmodem_cancel(xmodem_t* xm) ...@@ -127,7 +127,7 @@ void xmodem_cancel(xmodem_t* xm)
{ {
int i; int i;
if(!xm->cancelled) { if(!xm->cancelled && is_connected(xm)) {
for(i=0;i<8 && is_connected(xm);i++) for(i=0;i<8 && is_connected(xm);i++)
putcom(CAN); putcom(CAN);
for(i=0;i<10 && is_connected(xm);i++) for(i=0;i<10 && is_connected(xm);i++)
...@@ -491,7 +491,7 @@ BOOL xmodem_send_file(xmodem_t* xm, const char* fname, FILE* fp, time_t* start, ...@@ -491,7 +491,7 @@ BOOL xmodem_send_file(xmodem_t* xm, const char* fname, FILE* fp, time_t* start,
sent_bytes+=rd; sent_bytes+=rd;
} }
} }
if(sent_bytes >= (ulong)st.st_size && !xm->cancelled) { if(sent_bytes >= (ulong)st.st_size && !xm->cancelled && is_connected(xm)) {
#if 0 /* !SINGLE_THREADED */ #if 0 /* !SINGLE_THREADED */
lprintf(LOG_DEBUG,"Waiting for output buffer to empty... "); lprintf(LOG_DEBUG,"Waiting for output buffer to empty... ");
......
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