diff options
author | Alec Murphy <alec@checksum.fail> | 2017-07-15 15:26:46 -0400 |
---|---|---|
committer | Alec Murphy <alec@checksum.fail> | 2017-07-15 15:26:46 -0400 |
commit | 42236ceecd5c55d38614a362eddc3ec0736ed6a6 (patch) | |
tree | b437ca5154c0a4b53bcd5649d0525d4daff3f949 | |
parent | 999cb55a5d7cfb14bd015cfecd659b95faed7fc6 (diff) |
Workaround remain files count for non-continuous transfers
-rwxr-xr-x | Load.HC | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1,6 +1,6 @@ #include "::/Apps/TempleTerm/Bookmarks" #include "::/Apps/TempleTerm/ZModem" - + #define PROMPT_Q 0xFFFF #define REMOTE_Q 0xFFFE @@ -214,6 +214,7 @@ U0 TempleTermSession(I64 sock) progress1=rz_dpos; StrPrint(progress1_desc, "Saving File: %s", rz_shortfn); FileWrite(rz_filename, rz_fbuf, rz_filesize); + rz_remainfiles--; Free(rz_fbuf); Snd(62);Sleep(50);Snd(74);Sleep(50);SndRst; ProgressBarsRst; @@ -383,7 +384,6 @@ U0 TempleTermSession(I64 sock) if (rz_fileleft<=0) { - rz_remainfiles--; in_rz=2; } else @@ -421,7 +421,11 @@ U0 TempleTermSession(I64 sock) rz_ibpos += StrLen(rz_ibuf+rz_ibpos) + 1; rz_serial = Str2I64(rz_ibuf+rz_ibpos); rz_ibpos += StrLen(rz_ibuf+rz_ibpos) + 1; - rz_remainfiles = Str2I64(rz_ibuf+rz_ibpos); + // SEXYZ isn't decrementing this..? + if (rz_remainfiles<1) + { + rz_remainfiles = Str2I64(rz_ibuf+rz_ibpos); + }; rz_ibpos += StrLen(rz_ibuf+rz_ibpos) + 1; rz_totalleft = Str2I64(rz_ibuf+rz_ibpos); rz_ibpos += StrLen(rz_ibuf+rz_ibpos) + 1; @@ -491,12 +495,16 @@ U0 TempleTermSession(I64 sock) case 0x30 + ZFIN: sendHexHeader(sock, ZFIN); + if (rz_remainfiles!=0) + { + rz_remainfiles=0; + }; in_rz=0; DETECT_ZDLE=0; IN_ZDLE=0; break; - // sexyz?! you slag + // SEXYZ?! you slag case 'b': // ZEOF? rz_ibpos=0; rzb_state=0; @@ -1098,12 +1106,14 @@ I64 TempleTermConnect(U8 *host, I64 port=23) close(sock); Fs->draw_it=NULL; DCFill; + SndRst; PopUpOk("Connection closed."); MenuPop; return 0; } else { + SndRst; PopUpOk("Connection timed out."); return sock; }; |