[asterisk-commits] dvossel: branch 1.6.2 r189208 - in /branches/1.6.2: ./ channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 17 20:42:09 CDT 2009
Author: dvossel
Date: Fri Apr 17 20:42:04 2009
New Revision: 189208
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189208
Log:
Merged revisions 188647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r188647 | dvossel | 2009-04-15 17:10:04 -0500 (Wed, 15 Apr 2009) | 18 lines
Merged revisions 188646 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r188646 | dvossel | 2009-04-15 17:08:40 -0500 (Wed, 15 Apr 2009) | 12 lines
National prefix inserted even when caller ID not available
When the caller ID is restricted, the expected behavior is for the caller id to be blank. In chan_dahdi, the national prefix is placed onto the callers number even if its restricted (empty) causing the caller id to be the national prefix rather than blank.
(closes issue #13207)
Reported by: shawkris
Patches:
national_prefix.diff uploaded by dvossel (license 671)
Review: http://reviewboard.digium.com/r/220/
........
................
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/channels/chan_dahdi.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/channels/chan_dahdi.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/channels/chan_dahdi.c?view=diff&rev=189208&r1=189207&r2=189208
==============================================================================
--- branches/1.6.2/channels/chan_dahdi.c (original)
+++ branches/1.6.2/channels/chan_dahdi.c Fri Apr 17 20:42:04 2009
@@ -11249,6 +11249,12 @@
#if defined(HAVE_SS7)
static void ss7_apply_plan_to_number(char *buf, size_t size, const struct dahdi_ss7 *ss7, const char *number, const unsigned nai)
{
+ if (ast_strlen_zero(number)) { /* make sure a number exists so prefix isn't placed on an empty string */
+ if (size) {
+ *buf = '\0';
+ }
+ return;
+ }
switch (nai) {
case SS7_NAI_INTERNATIONAL:
snprintf(buf, size, "%s%s", ss7->internationalprefix, number);
@@ -12248,6 +12254,12 @@
{
if (pri->dialplan == -2) { /* autodetect the TON but leave the number untouched */
snprintf(buf, size, "%s", number);
+ return;
+ }
+ if (ast_strlen_zero(number)) { /* make sure a number exists so prefix isn't placed on an empty string */
+ if (size) {
+ *buf = '\0';
+ }
return;
}
switch (plan) {
More information about the asterisk-commits
mailing list