Caller-ID bug in mgetty 1.1.15

Gert Doering (gert@greenie.muc.de)
Sun, 5 Jul 1998 22:27:57 +0200


Hi,

if you have CallerID and mgetty 1.1.15, it's quite likely that mgetty will
break altogether - it will sit there, listen to incoming "RING"s, but 
will never actually pick up the phone.

Florian La Roche just sent me a very good log file (just 8 lines, but the
*right* 8 lines, bravo!), and I think I've found the bug.  Quite stupid,
actually -- but I can't really test it, as it manifests only if you have a
modem that reports CallerID on a line by itself, and which is NOT a ZyXEL
2864...).


Well, I just tested it (on the console, playing "modem", typing OK<cr> in
the right places :-) ), and it seems to work fine with the patch.

Appended below, to be released in 1.1.16 very soon.

gert
--------
Index: ring.c
===================================================================
RCS file: /u2/cvs/mgetty/ring.c,v
retrieving revision 4.5
diff -u -r4.5 ring.c
--- ring.c	1998/05/02 18:58:29	4.5
+++ ring.c	1998/07/05 20:19:30
@@ -221,9 +221,11 @@
 	     strncmp( buf, "TO:", 3 ) == 0 )
 	    { *dist_ring_number = ring_handle_ZyXEL( buf, msn_list ); break; }
 
-	/* now check the different RING types */
-	if ( strncmp( buf, "RING", 4 ) != 0 )	/* not RING<whatever> */
-		continue;			/* get next line */
+	/* now check the different RING types 
+	 * if not "RING<whatever>", clear buffer and get next line
+	 */
+	if ( strncmp( buf, "RING", 4 ) != 0 )
+	    { w = 0; lprintf( L_NOISE, "got: " ); continue; }
 
 	p=&buf[4];
 	while( isspace(*p) ) p++;

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert@greenie.muc.de
fax: +49-89-35655025                        gert.doering@physik.tu-muenchen.de