acs@amdahl.UUCP (06/18/87)
I've been working on the kermit portion of VT100 R2.6 recently since I seem to be having problems getting it to unfailingly GET files from a server (C-Kermit 4D(061) on the box at work). Well, I cleaned up the AbortIOs in kermit.c and xmodem.c like so: AbortIO(request); Wait(1 << the appropriate mp_SigBit); WaitIO(request); and did it for timer requests as well as Read_Request. Anyway, none of this seemed to help. What happens is that VT100, on its 2nd Receive Init packet only gets the last 4 or so bytes of the packet to the host!?! -- it would then hang. After some inspection of rinit() I found that it was not responding to a NAK nor resending the Receive Init on a timeout so I added the following in rinit() after the handling of the 'E' packet: case 'N': /* Other side NAKed us... */ return(state); /* ...so try again */ and the following after the check for USERABORT on the FALSE case 2 or 3 lines down: if (timeout == TIMEOUT) return(state); /* Resend Rec-init on a timeout */ Now it doesn't hang but the 2nd Receive Init packet *still* doesn't get through; 3rd Receive Init gets through just fine, 4th is hosed up, etc. I hacked and hewed at the code and just could NOT get the entire packet through to the host. By sprinkling emits() throughout spack() in kermit.c I found that the mere presence of the emits's would cause things to work! By simply adding a Delay(5L) to the ClearBuffer() routine in kermit.c I have effectively side-stepped the problem. Now for the $64K question: WHY!!??!! I speculate that it may have something to do with the requestor since (if I remember correctly) Intuition will handle the requestor asynchronously. Anyone have any light to shed? One other thing: I've noticed that the ACK packets that get sent to the host have an extra char or two appended to them after the EOL character (not really a problem since C-Kermit ignores everything between EOL and SOH). Why this happens I have *no* idea! If *anyone* has any ideas, please send e-mail -- I'll summarize and (hopefully) post some diffs that'll make this whole thing hang together! -- Tony Sumrall acs@amdahl.amdahl.com <=> ...!{ihnp4,hplabs,seismo}!amdahl!acs [ Opinions expressed herein are the author's and should not be construed to reflect the views of Amdahl Corp. ]