aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-08-03 20:52:20 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-08-03 20:52:20 +0000
commitf8d0dcac122feafe9ebd0aba502263f829c77667 (patch)
tree941ab22705ecf272616cda8c1ee04d5a8a267286 /funcs
parent27ff1247e65dcf7fd07faff050128e8811215076 (diff)
Merged revisions 280811 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r280811 | tilghman | 2010-08-03 15:49:10 -0500 (Tue, 03 Aug 2010) | 9 lines Prevent DAHDI channels from overriding the callerid, once it's been set by the user. (closes issue #16661) Reported by: jstapleton Patches: 20100414__issue16661.diff.txt uploaded by tilghman (license 14) 20100415__issue16661__1.6.2.diff.txt uploaded by tilghman (license 14) Tested by: jstapleton ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@280812 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_callerid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index 5e5585432..3c595daab 100644
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -191,6 +191,7 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data,
static int callerid_write(struct ast_channel *chan, const char *cmd, char *data,
const char *value)
{
+ int valid = 1;
if (!value || !chan)
return -1;
@@ -267,6 +268,11 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data,
chan->cid.cid_ton = atoi(value);
} else {
ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
+ valid = 0;
+ }
+
+ if (valid) {
+ chan->cid.cid_tns = 1;
}
return 0;