summaryrefslogtreecommitdiff
path: root/packages/mgetty/mgetty-1.1.30/43-moreinfo-cnd.c_bug112163
blob: 94a3ce66b0d9e2b3e016e4f63d7abfa3bf16eb51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- mgetty-1.1.30.orig/cnd.c	2002-11-05 16:43:04.000000000 -0500
+++ mgetty-1.1.30/cnd.c	2003-04-28 00:07:35.000000000 -0400
@@ -94,6 +94,9 @@
     /* Swedish Telia/ZyXEL Omni 52k - Torulf Lundgren, torulf@upsys.se */
     {"Diverting number:",       &CallerId},
 
+    /* FALCOM A2D gsm modem              */
+    {"+CLIP: ",              &CallerId},
+
     {NULL}
 };
     
@@ -163,6 +166,23 @@
 		    if ( *p == '\'' || *p == '\"' || !isprint(*p) ) *p = ' ';
 		    p++;
 		}
+
+		if ( strcmp(cp->string,"+CLIP: ") == 0 ) {
+		  char *q ;
+
+		  p = *(cp->variable) ;
+		  q = *(cp->variable) ;
+		  /* strip non digit charaters */
+		  while( ! isdigit(*p) ) p++;
+		  /* shift only digit characters */
+		  while( isdigit(*p) ) {
+		    *q=*p ;
+		    p++ ;
+		    q++ ;
+		  }
+		  *q = 0;
+		}
+
 	    }
 	    lprintf(L_JUNK, "CND: found: %s", *(cp->variable));
 	    return;