diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-03 02:12:33 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-03 02:12:33 +0000 |
commit | f42e29b281d0cd12ab8ec57afc89061c613e4d62 (patch) | |
tree | d5314391644adec2c19d0dc0b36644a20a12c759 /funcs | |
parent | fa32b379746e68f554e1b59db0911a2181bfcb75 (diff) |
Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.
SWP-1229
ABE-2161
* Ensure chan_local.c:local_call() will not leak cid.cid_dnid when
copying.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256104 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_callerid.c | 10 | ||||
-rw-r--r-- | funcs/func_redirecting.c | 6 |
2 files changed, 5 insertions, 11 deletions
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c index 3e9e74e0a..3de69950e 100644 --- a/funcs/func_callerid.c +++ b/funcs/func_callerid.c @@ -209,8 +209,8 @@ static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, } } } else if (!strncasecmp("rdnis", data, 5)) { - if (chan->cid.cid_rdnis) { - ast_copy_string(buf, chan->cid.cid_rdnis, len); + if (chan->redirecting.from.number) { + ast_copy_string(buf, chan->redirecting.from.number, len); } } else if (!strncasecmp("pres", data, 4)) { ast_copy_string(buf, ast_named_caller_presentation(chan->cid.cid_pres), len); @@ -311,10 +311,8 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data, ast_channel_unlock(chan); } else if (!strncasecmp("rdnis", data, 5)) { ast_channel_lock(chan); - if (chan->cid.cid_rdnis) { - ast_free(chan->cid.cid_rdnis); - } - chan->cid.cid_rdnis = ast_strdup(value); + ast_free(chan->redirecting.from.number); + chan->redirecting.from.number = ast_strdup(value); if (chan->cdr) { ast_cdr_setcid(chan->cdr, chan); } diff --git a/funcs/func_redirecting.c b/funcs/func_redirecting.c index 62c6d7bc9..87fc41abe 100644 --- a/funcs/func_redirecting.c +++ b/funcs/func_redirecting.c @@ -183,11 +183,7 @@ static int redirecting_read(struct ast_channel *chan, const char *cmd, char *dat ast_channel_lock(chan); if (!strncasecmp("from-", data, 5)) { - struct ast_party_id from_id; - - from_id = chan->redirecting.from; - from_id.number = chan->cid.cid_rdnis; - switch (redirecting_id_read(buf, len, data + 5, &from_id)) { + switch (redirecting_id_read(buf, len, data + 5, &chan->redirecting.from)) { case ID_FIELD_VALID: case ID_FIELD_INVALID: break; |