Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jun 1996 20:30:56 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        andreas@klemm.gtn.com (Andreas Klemm)
Cc:        current@freebsd.org
Subject:   Re: need a patch for uucp doing UUCP over TCP using i-proto
Message-ID:  <199606011830.UAA00355@uriah.heep.sax.de>
In-Reply-To: <Pine.BSF.3.92.960601152143.348B-100000@klemm.gtn.com> from Andreas Klemm at "Jun 1, 96 03:24:01 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Andreas Klemm wrote:

> Someone sent me a patch a long time ago that cured a bit a problem
> when using UUCP over TCP with i-proto. Generally it works relieble,
> but it often hangs, then I have to kill the current an initiate a
> new session.

It doesn't plainly hang.  Check your syslog, it exits with SIGFPE.

I've sent this problem report to Andrey and to the Taylor mailing list
long ago, but haven't got much feedback later.  IMHO, the entire tty
speed dependency is bogus for our modern modems, where the DTE speed
and line speed are typically rather different.

Her's my hack that works around the problem.

--- uucp/libunix/serial.c~	Mon Aug 28 12:33:21 1995
+++ uucp/libunix/serial.c	Sat Oct  7 20:21:33 1995
@@ -2371,7 +2371,7 @@
 	  else
 	    csleepchars = MAX_INPUT - 10;
 
-	  isleep = (int) (((long) csleepchars * 10000L) / q->ibaud);
+	  isleep = (int) (((long) csleepchars * 10000L) / (q->ibaud? q->ibaud: (long)1200));
 	  isleep -= 10;
 
 	  if (isleep > 10)
@@ -2773,8 +2773,8 @@
 	                        / baud bits/sec)
 			       * 10 bits/byte)
 	     */
-	  stime.tv_sec = (long) 10240 / q->ibaud;
-	  stime.tv_usec = ((((long) 1024000000 / q->ibaud) * (long) 10)
+	  stime.tv_sec = (long) 10240 / (q->ibaud? q->ibaud: (long)1200);
+	  stime.tv_usec = ((((long) 1024000000 / (q->ibaud? q->ibaud: (long)1200)) * (long) 10)
 			   % (long) 1000000);
 
 	  imask = 1 << q->o;
@@ -2846,7 +2846,7 @@
                  we don't need to use the catch stuff, since we know
                  that HAVE_RESTARTABLE_SYSCALLS is 0.  */
 	      usset_signal (SIGALRM, usalarm, TRUE, (boolean *) NULL);
-	      alarm ((int) ((long) 10240 / q->ibaud) + 1);
+	      alarm ((int) ((long) 10240 / (q->ibaud? q->ibaud: (long)1200)) + 1);
 
 	      /* There is a race condition here: on a severely loaded
                  system, we could get the alarm before we start the


-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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