summaryrefslogtreecommitdiff
path: root/packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668
diff options
context:
space:
mode:
Diffstat (limited to 'packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668')
-rw-r--r--packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug12866827
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668 b/packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668
index e69de29bb2..fa07ee1b8e 100644
--- a/packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668
+++ b/packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668
@@ -0,0 +1,27 @@
+--- mgetty-1.1.30.orig/ring.c Thu Dec 5 21:29:10 2002
++++ mgetty-1.1.30/ring.c Mon Sep 29 20:30:23 2003
+@@ -219,6 +219,8 @@
+ char buf[BUFSIZE], ch, *p;
+ int i, w, r;
+ int rc = SUCCESS;
++boolean got_name = FALSE;
++boolean got_nmbr = FALSE;
+ boolean got_dle; /* for <DLE><char> events (voice mode) */
+
+ lprintf( L_MESG, "wfr: waiting for ``RING''" );
+@@ -321,7 +324,14 @@
+ * instead of waiting for the next "real" RING
+ * (but don't do this for V253 DRON/DROF modems!)
+ */
+- if ( strncmp( buf, "NMBR", 4 ) == 0 && drox_count == 0 ) { break; }
++ if ( strncmp( buf, "NMBR", 4 ) == 0 && drox_count == 0 ) { got_nmbr = TRUE; }
++ if ( strncmp( buf, "NAME", 4 ) == 0 ) { got_name = TRUE; }
++
++ if ( got_nmbr && got_name ) break; /* got both name & number */
++
++ /* special case -> break; do not expect caller name */
++ if ( got_nmbr && CallerId[0] == 'P' ) break; /* private */
++ if ( got_nmbr && CallerId[0] == 'O' ) break; /* out of area */
+
+ /* V.253 ring cadences */
+ if ( strncmp( buf, "DRON", 4 ) == 0 ||