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 1bcc9174 authored by rswindell's avatar rswindell

Log warning if streaming disabled in zmodem_send_file().

zmodem_send_from() returns immediately if it receives anything other than a
ZACK in response to a ZCRCW subpacket.
parent 5e6b4b37
......@@ -1387,16 +1387,14 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent
int type;
while(is_connected(zm) && !zm->cancelled) {
type = zmodem_recv_header(zm);
if(type == ZNAK || type == ZRPOS || type == TIMEOUT) {
return type;
}
if(type == ZACK) {
if(type != ZACK)
return(type);
if(zm->rxd_header_pos == ftell(fp))
break;
lprintf(zm,LOG_WARNING,"ZACK for incorrect offset (%lu vs %lu)"
,zm->rxd_header_pos, ftell(fp));
}
}
if((ulong)ftell(fp) >= fsize) {
lprintf(zm,LOG_DEBUG,"end of file (%ld)", fsize );
......@@ -1462,6 +1460,9 @@ BOOL zmodem_send_file(zmodem_t* zm, char* fname, FILE* fp, BOOL request_init, ti
zm->file_skipped=FALSE;
if(zm->no_streaming)
lprintf(zm,LOG_WARNING,"Streaming disabled");
if(request_init) {
for(errors=0; errors<=zm->max_errors && !zm->cancelled && is_connected(zm); errors++) {
lprintf(zm,LOG_INFO,"Sending ZRQINIT (%u of %u)"
......
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