[Home]

Summary:ASTERISK-16464: [patch] Error in sig_pri.c issues compiler warning and causes chan_dahdi to be unloadable - 1.8.0-beta2
Reporter:b11d (b11d)Labels:
Date Opened:2010-07-29 13:04:14Date Closed:2010-07-29 14:48:38
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Channels/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) strdupa_oops.diff
Description:I have been testing Asterisk 1.8.0-beta2 on FreeBSD 8.1-amd64, and discovered
that chan_dahdi could not be loaded by Asterisk, it would return an error
and state that 'strudpa' was not defined.

During compilation (with GNU Make 3.81) it would compile sig_pri.c and give
a warning that 'strdupa' was not defined, but the compile would finish anyway.

I fixed the issue by modifying line 1749 of channels/sig_pri.c

- msn_list = strdupa(msn_patterns);  
+ msn_list = ast_strdupa(msn_patterns);

(sorry, not a real diff!)

From that point on, compliation was error/warning free, and chan_dahdi successfully
loads in Asterisk.  

I'm using libpri 1.4.12-beta1 and the dahdi port from FreeBSD ports/misc/dahdi



Comments:By: Malcolm Davenport (mdavenport) 2010-07-29 13:12:39

A "real" diff attached.  Thank you. :)

By: Leif Madsen (lmadsen) 2010-07-29 13:23:21

Thanks for the patch!

By: Digium Subversion (svnbot) 2010-07-29 14:47:15

Repository: asterisk
Revision: 280519

U   branches/1.8/channels/sig_pri.c

------------------------------------------------------------------------
r280519 | seanbright | 2010-07-29 14:47:15 -0500 (Thu, 29 Jul 2010) | 7 lines

Fix compiliation error in chan_dahdi (strdupa -> ast_strdupa).

(closes issue ASTERISK-16464)
Reported by: b11d
Patches:
     strdupa_oops.diff uploaded by malcolmd (license 924)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280519

By: Digium Subversion (svnbot) 2010-07-29 14:47:39

Repository: asterisk
Revision: 280519

U   branches/1.8/channels/sig_pri.c

------------------------------------------------------------------------
r280519 | seanbright | 2010-07-29 14:47:16 -0500 (Thu, 29 Jul 2010) | 7 lines

Fix compilation error in chan_dahdi (strdupa -> ast_strdupa).

(closes issue ASTERISK-16464)
Reported by: b11d
Patches:
     strdupa_oops.diff uploaded by malcolmd (license 924)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280519

By: Digium Subversion (svnbot) 2010-07-29 14:48:37

Repository: asterisk
Revision: 280520

_U  trunk/
U   trunk/channels/sig_pri.c

------------------------------------------------------------------------
r280520 | seanbright | 2010-07-29 14:48:37 -0500 (Thu, 29 Jul 2010) | 14 lines

Merged revisions 280519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r280519 | seanbright | 2010-07-29 15:47:16 -0400 (Thu, 29 Jul 2010) | 7 lines
 
 Fix compilation error in chan_dahdi (strdupa -> ast_strdupa).
 
 (closes issue ASTERISK-16464)
 Reported by: b11d
 Patches:
       strdupa_oops.diff uploaded by malcolmd (license 924)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280520