[asterisk-commits] twilson: branch 1.6.0 r257811 - in /branches/1.6.0: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 19 13:06:30 CDT 2010


Author: twilson
Date: Mon Apr 19 13:06:28 2010
New Revision: 257811

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=257811
Log:
Merged revisions 257810 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r257810 | twilson | 2010-04-19 12:57:41 -0500 (Mon, 19 Apr 2010) | 5 lines
  
  Fix incomplete CDR merge from r195881
  
  Because res/res_features.c was removed and main/cdr.c added, these changes
  didn't make it to trunk and the 1.6.x branches
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/features.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/features.c?view=diff&rev=257811&r1=257810&r2=257811
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Mon Apr 19 13:06:28 2010
@@ -2209,8 +2209,8 @@
 	struct ast_bridge_config backup_config;
 	struct ast_cdr *bridge_cdr = NULL;
 	struct ast_cdr *orig_peer_cdr = NULL;
-	struct ast_cdr *chan_cdr = pick_unlocked_cdr(chan->cdr); /* the proper chan cdr, if there are forked cdrs */
-	struct ast_cdr *peer_cdr = pick_unlocked_cdr(peer->cdr); /* the proper chan cdr, if there are forked cdrs */
+	struct ast_cdr *chan_cdr = chan->cdr; /* the proper chan cdr, if there are forked cdrs */
+	struct ast_cdr *peer_cdr = peer->cdr; /* the proper chan cdr, if there are forked cdrs */
 	struct ast_cdr *new_chan_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */
 	struct ast_cdr *new_peer_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */
 
@@ -2272,6 +2272,10 @@
 			ast_set_flag(chan_cdr, AST_CDR_FLAG_MAIN);
 			ast_cdr_update(chan);
 			bridge_cdr = ast_cdr_dup(chan_cdr);
+			/* rip any forked CDR's off of the chan_cdr and attach
+			 * them to the bridge_cdr instead */
+			bridge_cdr->next = chan_cdr->next;
+			chan_cdr->next = NULL;
 			ast_copy_string(bridge_cdr->lastapp, S_OR(chan->appl, ""), sizeof(bridge_cdr->lastapp));
 			ast_copy_string(bridge_cdr->lastdata, S_OR(chan->data, ""), sizeof(bridge_cdr->lastdata));
 			if (peer_cdr && !ast_strlen_zero(peer_cdr->userfield)) {
@@ -2318,11 +2322,11 @@
 		   tvcmp check to the if below */
 
 		if (peer_cdr && !ast_tvzero(peer_cdr->answer) && ast_tvcmp(peer_cdr->answer, bridge_cdr->start) >= 0) {
-			bridge_cdr->answer = peer_cdr->answer;
-			bridge_cdr->disposition = peer_cdr->disposition;
+			ast_cdr_setanswer(bridge_cdr, peer_cdr->answer);
+			ast_cdr_setdisposition(bridge_cdr, peer_cdr->disposition);
 			if (chan_cdr) {
-				chan_cdr->answer = peer_cdr->answer;
-				chan_cdr->disposition = peer_cdr->disposition;
+				ast_cdr_setanswer(chan_cdr, peer_cdr->answer);
+				ast_cdr_setdisposition(chan_cdr, peer_cdr->disposition);
 			}
 		} else {
 			ast_cdr_answer(bridge_cdr);




More information about the asterisk-commits mailing list