]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/mgetty/mgetty-1.1.30/41-ugly-redo-ring.c_bug128668
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / mgetty / mgetty-1.1.30 / 41-ugly-redo-ring.c_bug128668
1 --- mgetty-1.1.30.orig/ring.c   Thu Dec  5 21:29:10 2002
2 +++ mgetty-1.1.30/ring.c        Mon Sep 29 20:30:23 2003
3 @@ -219,6 +219,8 @@
4  char   buf[BUFSIZE], ch, *p;
5  int    i, w, r;
6  int    rc = SUCCESS;
7 +boolean got_name = FALSE;
8 +boolean got_nmbr = FALSE;
9  boolean        got_dle;                /* for <DLE><char> events (voice mode) */
10  
11      lprintf( L_MESG, "wfr: waiting for ``RING''" );
12 @@ -321,7 +324,14 @@
13          * instead of waiting for the next "real" RING
14          * (but don't do this for V253 DRON/DROF modems!)
15          */
16 -       if ( strncmp( buf, "NMBR", 4 ) == 0 && drox_count == 0 ) { break; }
17 +       if ( strncmp( buf, "NMBR", 4 ) == 0 && drox_count == 0 ) { got_nmbr = TRUE; }
18 +       if ( strncmp( buf, "NAME", 4 ) == 0 ) { got_name = TRUE; }
19 +
20 +       if ( got_nmbr && got_name ) break;      /* got both name & number */
21 +
22 +       /* special case -> break; do not expect caller name */
23 +       if ( got_nmbr && CallerId[0] == 'P' ) break; /* private */
24 +       if ( got_nmbr && CallerId[0] == 'O' ) break; /* out of area */
25  
26         /* V.253 ring cadences */
27         if ( strncmp( buf, "DRON", 4 ) == 0 ||