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,15 +1387,13 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent ...@@ -1387,15 +1387,13 @@ int zmodem_send_from(zmodem_t* zm, FILE* fp, ulong pos, ulong fsize, ulong* sent
int type; int type;
while(is_connected(zm) && !zm->cancelled) { while(is_connected(zm) && !zm->cancelled) {
type = zmodem_recv_header(zm); type = zmodem_recv_header(zm);
if(type == ZNAK || type == ZRPOS || type == TIMEOUT) { if(type != ZACK)
return type; return(type);
}
if(type == ZACK) { if(zm->rxd_header_pos == ftell(fp))
if(zm->rxd_header_pos == ftell(fp)) break;
break; lprintf(zm,LOG_WARNING,"ZACK for incorrect offset (%lu vs %lu)"
lprintf(zm,LOG_WARNING,"ZACK for incorrect offset (%lu vs %lu)" ,zm->rxd_header_pos, ftell(fp));
,zm->rxd_header_pos, ftell(fp));
}
} }
if((ulong)ftell(fp) >= fsize) { if((ulong)ftell(fp) >= fsize) {
...@@ -1462,6 +1460,9 @@ BOOL zmodem_send_file(zmodem_t* zm, char* fname, FILE* fp, BOOL request_init, ti ...@@ -1462,6 +1460,9 @@ BOOL zmodem_send_file(zmodem_t* zm, char* fname, FILE* fp, BOOL request_init, ti
zm->file_skipped=FALSE; zm->file_skipped=FALSE;
if(zm->no_streaming)
lprintf(zm,LOG_WARNING,"Streaming disabled");
if(request_init) { if(request_init) {
for(errors=0; errors<=zm->max_errors && !zm->cancelled && is_connected(zm); errors++) { for(errors=0; errors<=zm->max_errors && !zm->cancelled && is_connected(zm); errors++) {
lprintf(zm,LOG_INFO,"Sending ZRQINIT (%u of %u)" 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