mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 11:32:25 +00:00
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:
10
main/dial.c
10
main/dial.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user