[asterisk-commits] rmudgett: trunk r410542 - in /trunk: ./ main/cdr.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 13 16:27:20 CDT 2014
Author: rmudgett
Date: Thu Mar 13 16:27:15 2014
New Revision: 410542
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410542
Log:
cdr.c: Add missing aow_unlock(cdr) in off nominal path of handle_dial_message().
* Trivial common code hoisting in handle_bridge_leave_message().
* Some whitespace fixing.
........
Merged revisions 410541 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/cdr.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cdr.c?view=diff&rev=410542&r1=410541&r2=410542
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Thu Mar 13 16:27:15 2014
@@ -1973,6 +1973,7 @@
new_cdr = cdr_object_create_and_append(cdr);
if (!new_cdr) {
+ ao2_unlock(cdr);
return;
}
new_cdr->fn_table->process_dial_begin(new_cdr,
@@ -2217,7 +2218,6 @@
/* Party A */
ao2_lock(cdr);
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
-
if (!it_cdr->fn_table->process_bridge_leave) {
continue;
}
@@ -2228,11 +2228,10 @@
left_bridge = 1;
}
}
+ ao2_unlock(cdr);
if (!left_bridge) {
- ao2_unlock(cdr);
return;
}
- ao2_unlock(cdr);
if (strcmp(bridge->subclass, "parking")) {
/* Party B */
@@ -2436,10 +2435,10 @@
if (!handled_cdr) {
handled_cdr = it_cdr;
}
- break;
+ break;
case BRIDGE_ENTER_NEED_CDR:
/* Pass */
- break;
+ break;
case BRIDGE_ENTER_NO_PARTY_B:
/* We didn't win on any - end this CDR. If someone else comes in later
* that is Party B to this CDR, it can re-activate this CDR.
@@ -2448,7 +2447,7 @@
handled_cdr = it_cdr;
}
cdr_object_finalize(cdr);
- break;
+ break;
}
}
}
@@ -3355,6 +3354,7 @@
{
SCOPED_AO2LOCK(lock, cdr);
+
cdr_obj = cdr->last;
if (cdr_obj->fn_table == &finalized_state_fn_table) {
/* If the last CDR in the chain is finalized, don't allow a fork -
More information about the asterisk-commits
mailing list