From e1b5f1a76d0f4605288d8606f7ccc8ccd177d4fd Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 10 Jun 2005 10:39:39 +0000 Subject: [PATCH] Adjust file position for bytes already sent successfully in zmodem_send_file(). --- src/sbbs3/zmodem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sbbs3/zmodem.c b/src/sbbs3/zmodem.c index d5afd33f94..0f5f54ad2f 100644 --- a/src/sbbs3/zmodem.c +++ b/src/sbbs3/zmodem.c @@ -1671,8 +1671,10 @@ BOOL zmodem_send_file(zmodem_t* zm, char* fname, FILE* fp, BOOL request_init, ti if(type == ZFERR || type == ZABORT || zm->cancelled) return(FALSE); - if(sent!=NULL) - *sent+=sent_bytes; + if(sent != NULL) + *sent += sent_bytes; + + pos += sent_bytes; if(type == ZACK) /* success */ break; @@ -1772,9 +1774,10 @@ int zmodem_recv_files(zmodem_t* zm, const char* download_dir, ulong* bytes_recei break; } if((fp=fopen(fpath,"rb"))==NULL) { - lprintf(zm,LOG_ERR,"Error %d opening %s",errno,fpath); + lprintf(zm,LOG_ERR,"Error %d opening %s", errno, fpath); break; } + lprintf(zm,LOG_INFO,"Calculating CRC of %s", fpath); crc=fcrc32(fp,l); fclose(fp); if(!zmodem_get_crc(zm,l,&rcrc)) { -- GitLab