[comp.bugs.4bsd.ucb-fixes] V1.33

bostic@OKEEFFE.BERKELEY.EDU (Keith Bostic) (06/29/87)

Subject: fixes to the uucp 'g' protocol
Index: usr.bin/uucp/pk1.c 4.3BSD

Description:
	1) While fixing a different problem with the 'g' protocol in uucico,
	a new bug was introduced.
	2) Increasing the window size from 3 to 7 can gain a 90% throughput
	increase on slow, effectively half duplex connections (e.g.
	PC Pursuit). The increased window size is backwards compatible.

Repeat-By:
	1) Run uucico on a very noisy line and watch it drop the connection.
	2) Use PC Pursuit to transfer data. (A classic time/cost tradeoff.)

Fix:
	Apply the following patch. The diff to pk.h fixes 2). The diff
	to pk1.c fixes 1);

	These patches have already been posted elsewhere. They are being
	posted here for completeness.

diff -c -r2.1 pk.h
*** /tmp/,RCSt1006606	Mon Jun 29 13:29:32 1987
--- pk.h	Mon Jun 29 13:27:19 1987
***************
*** 10,16 ****
  
  #define	HDRSIZ		6	/* Packet header size */
  #define	PACKSIZE	64	/* Standard packet size */
! #define WINDOWS		3
  
  #define TAILSIZE	2	/* Number of trailing nulls after packet    */
  
--- 10,16 ----
  
  #define	HDRSIZ		6	/* Packet header size */
  #define	PACKSIZE	64	/* Standard packet size */
! #define WINDOWS		7
  
  #define TAILSIZE	2	/* Number of trailing nulls after packet    */
  
*** /tmp/,RCSt1006606	Mon Jun 29 13:29:35 1987
--- pk1.c	Fri Nov  7 19:24:32 1986
***************
*** 196,202 ****
  		return;
  	}
  	if (k && pksizes[k] == pk->p_rsize) {
! 		pk->p_rpr = (h->cntl >> 3) & MOD8;
  		pksack(pk);
  		bp = pk->p_ipool;
  		if (bp == NULL) {
--- 196,203 ----
  		return;
  	}
  	if (k && pksizes[k] == pk->p_rsize) {
! 		pk->p_rpr = h->cntl & MOD8;
! 		DEBUG(7, "end pksack 0%o\n", pk->p_rpr);
  		pksack(pk);
  		bp = pk->p_ipool;
  		if (bp == NULL) {