[comp.protocols.tcp-ip] Problems with tn3270

sansom@trwrb.UUCP (Richard E. Sansom) (11/08/89)

In article <121@venice.SEDD.TRW.COM> gay@venice.sedd.trw.com (lance gay) writes:
>...the software aborts with a "Short count received from host!" error message.
>
>Lance Gay                                    Internet: gay@venice.sedd.trw.com
>TRW Systems Engineering & Development Div.   Phone: 213-328-1892
>Redondo Beach, CA  90278

Lance, if you have the same code I do, then the problem is in the
disttn3270/telnet/Source/telnet.c file.  Unfortunately, I didn't save
a copy of the bad code, so I only have the fix.  Take a look for the
"case EOR:" switch statement.  Here's the way the code looks in my
fixed version:

	    case EOR:
		if (In3270) {
/* begin fix */
		    if (Ibackp == Ifrontp) {
			Ibackp = Ifrontp = Ibuf;
			ISend = 0;	/* should have been! */
		    } else {
			Ibackp += DataFromNetwork(Ibackp, Ifrontp-Ibackp, 1);
			ISend = 1;
		    }
/* end fix */
		}
		break;

See, it only made sense to call the DataFromNetwork() routine if Ifrontp
and Ibackp were NOT equal, and I think the original code was doing just the
opposite.

Anyway, if you make these changes, you _should_ get a working version.

-Rich

...ucbvax!trwrb!sansom
sansom@trwrb.dsd.trw.com