Patch: ifmail-2.14: turns off RLE for zmodem

Rachael Munns (vashti@drmach.dream.org.uk)
Fri, 16 Jul 1999 19:25:45 +0100

I've recently been having trouble connecting to systems using the TIMS
mailer, which uses RLE, I think for zmodem CRCs. I had a bit of a play
around to turn it off, and connections to such systems now seem to be
working well.

Looking at the code, it looks like an attempt had been made to turn it
off already, which had resulted in connections to systems that used RLE
failing completely with a string of "Bad CRC" errors, as the code to
deal with the RLE was never called, but the remote machine was under
the impression that RLE would work.

I've attached my patch for inspection; can anyone see anything wrong with
it?

--
Rachael Munns                                         Fidonet 2:442/600

--- ifmail-2.14-pl1/ifcico/zmmisc.c Sun Jul 13 00:07:40 1997 +++ ifmail-2.12-pl4/ifcico/zmmisc.c Fri Jul 16 18:59:30 1999 @@ -356,10 +356,8 @@ switch (Crc32r) { case 1: return zrdat32(buf, length); -/** case 2: return zrdatr32(buf, length); -**/ } crc = Rxcount = 0; end = buf + length; --- ifmail-2.14-pl1/ifcico/zmrecv.c Sun Sep 8 12:30:27 1996 +++ ifmail-2.12-pl4/ifcico/zmrecv.c Wed Jul 14 16:50:54 1999 @@ -128,7 +128,14 @@ Txhdr[ZF0] = CANFC32|CANFDX|CANOVIO; if (Zctlesc) Txhdr[ZF0] |= TESCCTL; + +/* RJM 1999-07-07: This has been commented out because ifcico may think + * it can do RLE, but it's blatantly not working here. + */ +#if 0 Txhdr[ZF0] |= CANRLE; +#endif + Txhdr[ZF1] = CANVHDR; zshhdr(4,tryzhdrtype, Txhdr); if (tryzhdrtype == ZSKIP) /* Don't skip too far */ --- ifmail-2.14-pl1/ifcico/zmsend.c Sun Jul 13 00:37:37 1997 +++ ifmail-2.12-pl4/ifcico/zmsend.c Fri Jul 16 18:51:49 1999 @@ -267,11 +267,12 @@ register c; debug(11,"sendzsinit"); - if (Myattn[0] == '\0' && (!Zctlesc || (Rxflags & TESCCTL))) + if (Myattn[0] == '\0' && (!Zctlesc || (Rxflags & TESCCTL & ~CANRLE))) return OK; errors = 0; for (;;) { stohdr(0L); + Txhdr[ZF0] = Txhdr[ZF0] & ~CANRLE ; if (Zctlesc) { Txhdr[ZF0] |= TESCCTL; zshhdr(4, ZSINIT, Txhdr); }