[svn-commits] mjordan: trunk r396371 - /trunk/main/cdr.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Aug 7 21:58:03 CDT 2013
Author: mjordan
Date: Wed Aug 7 21:58:01 2013
New Revision: 396371
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396371
Log:
Handle Surrogate channels in Dial message processing
Depending on when a Surrogate channel replaces an existing channel, it is
possible to get a Dial message for the Surrogate channel. When this occurs, no
CDR will exist for the channel as Surrogate channels are ignored. Safely handle
the case when a CDR doesn't exist for a Dial message.
Modified:
trunk/main/cdr.c
Modified: trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cdr.c?view=diff&rev=396371&r1=396370&r2=396371
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Wed Aug 7 21:58:01 2013
@@ -1818,6 +1818,11 @@
cdr = ao2_find(active_cdrs_by_channel, peer->name, OBJ_KEY);
}
+ if (!cdr) {
+ ast_log(AST_LOG_WARNING, "No CDR for channel %s\n", caller ? caller->name : peer->name);
+ return;
+ }
+
ao2_lock(cdr);
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
if (ast_strlen_zero(dial_status)) {
@@ -1896,7 +1901,7 @@
/*! \internal \brief Filter channel snapshots by technology */
static int filter_channel_snapshot(struct ast_channel_snapshot *snapshot)
{
- return snapshot->tech_properties & (AST_CHAN_TP_ANNOUNCER | AST_CHAN_TP_RECORDER);
+ return snapshot->tech_properties & AST_CHAN_TP_INTERNAL;
}
/*! \internal \brief Filter a channel cache update */
More information about the svn-commits
mailing list