diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/cel.c | 4 | ||||
-rw-r--r-- | main/channel.c | 16 | ||||
-rw-r--r-- | main/dial.c | 10 |
3 files changed, 3 insertions, 27 deletions
diff --git a/main/cel.c b/main/cel.c index 0e08e95c6..2c6dd9b27 100644 --- a/main/cel.c +++ b/main/cel.c @@ -440,7 +440,7 @@ struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event tchan->cid.cid_name = ast_strdup(record.caller_id_name); tchan->cid.cid_num = ast_strdup(record.caller_id_num); tchan->cid.cid_ani = ast_strdup(record.caller_id_ani); - tchan->cid.cid_rdnis = ast_strdup(record.caller_id_rdnis); + tchan->redirecting.from.number = ast_strdup(record.caller_id_rdnis); tchan->cid.cid_dnid = ast_strdup(record.caller_id_dnid); ast_copy_string(tchan->exten, record.extension, sizeof(tchan->exten)); @@ -533,7 +533,7 @@ int ast_cel_report_event(struct ast_channel *chan, enum ast_cel_event_type event AST_EVENT_IE_CEL_CIDNAME, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_name, ""), AST_EVENT_IE_CEL_CIDNUM, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_num, ""), AST_EVENT_IE_CEL_CIDANI, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_ani, ""), - AST_EVENT_IE_CEL_CIDRDNIS, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_rdnis, ""), + AST_EVENT_IE_CEL_CIDRDNIS, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->redirecting.from.number, ""), AST_EVENT_IE_CEL_CIDDNID, AST_EVENT_IE_PLTYPE_STR, S_OR(chan->cid.cid_dnid, ""), AST_EVENT_IE_CEL_EXTEN, AST_EVENT_IE_PLTYPE_STR, chan->exten, AST_EVENT_IE_CEL_CONTEXT, AST_EVENT_IE_PLTYPE_STR, chan->context, diff --git a/main/channel.c b/main/channel.c index d3c9e9dd5..5be973a49 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1464,9 +1464,7 @@ static void free_cid(struct ast_callerid *cid) ast_free(cid->cid_name); if (cid->cid_ani) ast_free(cid->cid_ani); - if (cid->cid_rdnis) - ast_free(cid->cid_rdnis); - cid->cid_dnid = cid->cid_num = cid->cid_name = cid->cid_ani = cid->cid_rdnis = NULL; + cid->cid_dnid = cid->cid_num = cid->cid_name = cid->cid_ani = NULL; ast_party_subaddress_free(&cid->subaddress); ast_party_subaddress_free(&cid->dialed_subaddress); } @@ -6973,18 +6971,6 @@ void ast_channel_set_redirecting(struct ast_channel *chan, const struct ast_part ast_channel_lock(chan); ast_party_id_set(&chan->redirecting.from, &redirecting->from); - if (redirecting->from.number - && redirecting->from.number != chan->redirecting.from.number) { - /* - * Must move string to ast_channel.cid.cid_rdnis until it goes away. - */ - if (chan->cid.cid_rdnis) { - ast_free(chan->cid.cid_rdnis); - } - chan->cid.cid_rdnis = chan->redirecting.from.number; - chan->redirecting.from.number = NULL; - } - ast_party_id_set(&chan->redirecting.to, &redirecting->to); chan->redirecting.reason = redirecting->reason; chan->redirecting.count = redirecting->count; diff --git a/main/dial.c b/main/dial.c index 31ac899f8..7435d926c 100644 --- a/main/dial.c +++ b/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; |