From owner-freebsd-current Sat Jun 1 11:52:23 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA18713 for current-outgoing; Sat, 1 Jun 1996 11:52:23 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA18694 for ; Sat, 1 Jun 1996 11:52:17 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id UAA01916; Sat, 1 Jun 1996 20:51:43 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id UAA19568; Sat, 1 Jun 1996 20:51:43 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id UAA00355; Sat, 1 Jun 1996 20:30:56 +0200 (MET DST) From: J Wunsch Message-Id: <199606011830.UAA00355@uriah.heep.sax.de> Subject: Re: need a patch for uucp doing UUCP over TCP using i-proto To: andreas@klemm.gtn.com (Andreas Klemm) Date: Sat, 1 Jun 1996 20:30:56 +0200 (MET DST) Cc: current@freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from Andreas Klemm at "Jun 1, 96 03:24:01 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)