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: https://origsvn.digium.com/svn/asterisk/trunk@256104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2010-04-03 02:12:33 +00:00
parent 5333a48b17
commit a5a0a5f867
20 changed files with 66 additions and 118 deletions

View File

@@ -174,15 +174,6 @@ static const struct ast_option_types {
{ AST_DIAL_OPTION_MAX, NULL, NULL }, /*!< Terminator of list */
};
/*! \brief free the buffer if allocated, and set the pointer to the second arg */
#define S_REPLACE(s, new_val) \
do { \
if (s) { \
free(s); \
} \
s = (new_val); \
} while (0)
/*! \brief Maximum number of channels we can watch at a time */
#define AST_MAX_WATCHERS 256
@@ -275,7 +266,6 @@ static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_chann
ast_channel_datastore_inherit(chan, channel->owner);
/* Copy over callerid information */
S_REPLACE(channel->owner->cid.cid_rdnis, ast_strdup(chan->cid.cid_rdnis));
ast_party_redirecting_copy(&channel->owner->redirecting, &chan->redirecting);
channel->owner->cid.cid_tns = chan->cid.cid_tns;