Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit aa0af1ee authored by rswindell's avatar rswindell

Treat read error (fread() returns 0) the same as EOF.

parent 90fff93a
......@@ -1379,7 +1379,7 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent
/*
* at end of file wait for an ACK - can't use feof() here!
*/
if((ulong)ftell(fp) >= fsize)
if((ulong)ftell(fp) >= fsize || n==0)
type = ZCRCW;
zmodem_send_data(zm, type, zm->tx_data_subpacket, n);
......@@ -1407,6 +1407,11 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent
lprintf(zm,LOG_DEBUG,"zmodem_send_from: end of file (%ld)", fsize );
return ZACK;
}
if(n==0) {
lprintf(zm,LOG_DEBUG,"zmodem_send_from: read error at offset %lu", ftell(fp) );
return ZACK;
}
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment