Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 May 1995 20:22:41 +0200 (MET DST)
From:      Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
To:        freebsd-hackers@FreeBSD.org (FreeBSD Hackers' list)
Subject:   Patch for uucico and "i" protocol
Message-ID:  <199505061822.UAA06891@keltia.frmug.fr.net>

next in thread | raw e-mail | index | archive | help

Here is a patch to uucico which solve some problems with the bidirectionnal
"i" protocol. It seems to be blessed by Ian Taylor as  shown in the message
below (I asked  the taylor-uucp mailing list). It  would be nice to have it
for 2.1 if not for 2.0.5.

------------------------------------------------------------
Date: Sat, 6 May 95 12:04 MET DST
From: johannes@titan.westfalen.de (Johannes Stille)
To: roberto@hsc.fr.net
Subject: Re: Is this fix offcial or not ?
Cc: johannes@titan.westfalen.de
Sender: roberto

Hello Ollivier!

>I've found the following patch which  fixes some flow control problems with
>the "i" protocol.  I'd like to know if the patch  is official or unofficial
>and recommended or not.

The patch is from me, so it's not really official, but Ian Taylor has
seen it and generally agrees with it, so I'd assume that it will go 
into the next release. 
I very much recommend it, as I have heard from several others who had
the same flow control problem as I did without this patch.

    Johannes
------------------------------------------------------------

diff -r -u1 uucp-1.05.orig/rec.c uucp-1.05/rec.c
--- uucp-1.05.orig/rec.c	Fri May  6 05:24:16 1994
+++ uucp-1.05/rec.c	Wed Aug 10 02:36:11 1994
@@ -795,11 +795,2 @@
 
-  if (! (*qdaemon->qproto->pfsendcmd) (qdaemon, ab, qtrans->ilocal,
-				       qtrans->iremote))
-    {
-      (void) ffileclose (qtrans->e);
-      (void) remove (qinfo->ztemp);
-      urrec_free (qtrans);
-      return FALSE;
-    }
-
   qinfo->freplied = TRUE;
@@ -820,2 +811,11 @@
 
+  if (! (*qdaemon->qproto->pfsendcmd) (qdaemon, ab, qtrans->ilocal,
+				       qtrans->iremote))
+    {
+      (void) ffileclose (qtrans->e);
+      (void) remove (qinfo->ztemp);
+      urrec_free (qtrans);
+      return FALSE;
+    }
+
   return TRUE;
@@ -864,2 +864,4 @@
   boolean fret;
+  int ilocal = qtrans->ilocal;
+  int iremote = qtrans->iremote;
 
@@ -900,5 +902,2 @@
 
-  fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, ab, qtrans->ilocal,
-					qtrans->iremote);
-
   qinfo->fsent = TRUE;
@@ -911,2 +910,4 @@
 
+  fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, ab, ilocal, iremote);
+
   return fret;
@@ -1237,2 +1238,4 @@
   boolean fret;
+  int ilocal = qtrans->ilocal;
+  int iremote = qtrans->iremote;
 
@@ -1254,5 +1257,2 @@
 
-  fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, zsend,
-					qtrans->ilocal, qtrans->iremote);
-
   /* Now, if that was a remote command, then when the confirmation
@@ -1264,2 +1264,5 @@
   urrec_free (qtrans);
+
+  fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, zsend, ilocal, iremote);
+
   return fret;
Only in uucp-1.05: rec.c.orig
diff -r -u1 uucp-1.05.orig/send.c uucp-1.05/send.c
--- uucp-1.05.orig/send.c	Fri May  6 05:24:17 1994
+++ uucp-1.05/send.c	Thu Aug 11 04:10:41 1994
@@ -348,5 +348,2 @@
 
-  if (qtrans != NULL)
-    usfree_send (qtrans);
-
   return TRUE;
@@ -373,4 +370,8 @@
       && qdaemon->cmax_receive < qinfo->cbytes)
-    return flocal_send_fail (qtrans, &qtrans->s, qdaemon,
+    {
+      fret = flocal_send_fail (qtrans, &qtrans->s, qdaemon,
 			     "too large for receiver");
+      usfree_send (qtrans);
+      return fret;
+    }
 
@@ -597,3 +598,6 @@
 				  qdaemon, zerr))
-	    return FALSE;
+	    {
+	      usfree_send (qtrans);
+	      return FALSE;
+	    }
 	}
@@ -1038,2 +1042,4 @@
   boolean fret;
+  int ilocal = qtrans->ilocal;
+  int iremote = qtrans->iremote;
 
@@ -1053,6 +1059,5 @@
   
-  fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, z, qtrans->ilocal,
-					qtrans->iremote);
   xfree (qtrans->pinfo);
   utransfree (qtrans);
+  fret = (*qdaemon->qproto->pfsendcmd) (qdaemon, z, ilocal, iremote);
   return fret;


-- 
Ollivier ROBERT    -=- The daemon is FREE! -=-    roberto@keltia.frmug.fr.net
   FreeBSD keltia 2.0-BUILT-19950503 #3: Wed May  3 19:53:04 MET DST 1995



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505061822.UAA06891>