Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 301519 Details for
Bug 232522
mgetty does not collect caller name from modem properly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
One patch in unified format equivalent to the four other patches
some_patch.patch (text/plain), 4.44 KB, created by
Martin Nagy
on 2008-04-07 13:52:30 UTC
(
hide
)
Description:
One patch in unified format equivalent to the four other patches
Filename:
MIME Type:
Creator:
Martin Nagy
Created:
2008-04-07 13:52:30 UTC
Size:
4.44 KB
patch
obsolete
>diff -up mgetty-1.1.33/callback/callback.c.some_patch mgetty-1.1.33/callback/callback.c >--- mgetty-1.1.33/callback/callback.c.some_patch 2008-04-07 15:30:41.000000000 +0200 >+++ mgetty-1.1.33/callback/callback.c 2008-04-07 15:31:00.000000000 +0200 >@@ -396,7 +396,7 @@ char * r; > /* provide some "dummy" things for do_chat(), otherwise callback won't link */ > /*!!! FIXME - we don't really want this */ > int virtual_ring = FALSE; >-void cndfind _P1( (p), char * p ) { /* DUMMY */ } >+int cndfind _P1( (p), char * p ) { /* DUMMY */ } > > int main _P2((argc, argv), int argc, char ** argv) > { >diff -up mgetty-1.1.33/mgetty.h.some_patch mgetty-1.1.33/mgetty.h >--- mgetty-1.1.33/mgetty.h.some_patch 2008-04-07 15:35:00.000000000 +0200 >+++ mgetty-1.1.33/mgetty.h 2008-04-07 15:35:10.000000000 +0200 >@@ -287,7 +287,7 @@ extern char *CallTime; > extern char *CallName; > extern char *CalledNr; > >-void cndfind _PROTO((char *str)); >+int cndfind _PROTO((char *str)); > int cndlookup _PROTO((void)); > int cnd_call _PROTO((char *name, char *tty, int dist_ring )); > >diff -up mgetty-1.1.33/cnd.c.some_patch mgetty-1.1.33/cnd.c >--- mgetty-1.1.33/cnd.c.some_patch 2008-04-07 15:31:40.000000000 +0200 >+++ mgetty-1.1.33/cnd.c 2008-04-07 15:34:39.000000000 +0200 >@@ -101,7 +101,7 @@ struct cndtable cndtable[] = > }; > > >-void >+int > cndfind _P1((str), char *str) > { > struct cndtable *cp; >@@ -121,15 +121,38 @@ cndfind _P1((str), char *str) > asked for it with AT\O. The CID will simply get sent on a single > line consisting only of digits. So, if we get a line starting > with a digit, let's assume that it's the CID... >+ >+ The USRobotics can send unformatted caller id data. Allow for that as well. > */ > if ( isdigit(*str) ) > { >+ int CheckSum = 0; // to validate possible unformatted display >+ int digit; > CallerId = p = strdup(str); >- while( isdigit(*p) ) p++; >+ // while( isdigit(*p) ) p++; >+ while( isxdigit(*p) ) p++; > *p = 0; > lprintf( L_NOISE, "CND: ELink caller ID: '%s'", CallerId ); >- return; >+ return 1; > } >+ // Check for an unformatted display of caller id. Calculate FSK checksum... >+ p = CallerId; >+ while (*p) { >+ if (isdigit(*p)) digit = (*p - '0'); >+ else digit = 10 + (tolower(*p) - 'a'); >+ CheckSum += (digit << 4); >+ p++; >+ if (!*p) { break; } // odd number of characters, not proper hex, cannot be FSK >+ if (isdigit(*p)) digit = (*p - '0'); >+ else digit = 10 + (tolower(*p) - 'a'); >+ CheckSum += digit; >+ CheckSum &= 255; >+ p++; >+ } >+ if (CheckSum == 0) { >+ lprintf( L_NOISE, "CND: FSK caller ID: '%s'", CallerId); >+ return 4; >+ } > > for (cp = cndtable; cp->string; cp++) > { >@@ -137,7 +160,7 @@ cndfind _P1((str), char *str) > if (strncmp(cp->string, str, len) == 0) > { > if (!cp->variable) >- return; >+ return 0; > > /* special case: Rockwell sends *two* MESG=... lines */ > if (cp->variable == &CallMsg1 && CallMsg1[0] != 0) >@@ -168,12 +191,13 @@ cndfind _P1((str), char *str) > } > } > lprintf(L_JUNK, "CND: found: %s", *(cp->variable)); >- return; >+ return 1; > } > } > } > > /* process Rockwell-style caller ID. Weird */ >+ return 0; > > void process_rockwell_mesg _P0 (void) > { >diff -up mgetty-1.1.33/ring.c.some_patch mgetty-1.1.33/ring.c >--- mgetty-1.1.33/ring.c.some_patch 2008-04-07 15:35:29.000000000 +0200 >+++ mgetty-1.1.33/ring.c 2008-04-07 15:35:39.000000000 +0200 >@@ -219,6 +219,7 @@ int wait_for_ring _P6((fd, msn_list, tim > char buf[BUFSIZE], ch, *p; > int i, w, r; > int rc = SUCCESS; >+int need_cnd_items = 4; /* date, time, number and name - need these before calling cnd-program */ > boolean got_dle; /* for <DLE><char> events (voice mode) */ > > lprintf( L_MESG, "wfr: waiting for ``RING''" ); >@@ -311,7 +312,7 @@ boolean got_dle; /* for <DLE><char> eve > /* got a full line */ > if ( w == 0 ) { continue; } /* ignore empty lines */ > buf[w] = '\0'; >- cndfind( buf ); /* grab caller ID */ >+ need_cnd_items -= cndfind( buf ); /* grab caller ID, adjust count of needed data items for cnd-program */ > > /* ZyXEL CallerID/MSN display? */ > if ( strncmp( buf, "FM:", 3 ) == 0 || >@@ -323,7 +324,8 @@ boolean got_dle; /* for <DLE><char> eve > * 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 ) { break; } >+ if ( (need_cnd_items <= 0) && (drox_count == 0) ) { break; } > > /* V.253 ring cadences */ > if ( strncmp( buf, "DRON", 4 ) == 0 ||
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232522
:
150181
|
150250
|
155149
|
161315
|
301512
|
301513
|
301514
|
301515
| 301519