[asterisk-commits] mjordan: branch 12 r422769 - /branches/12/main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 6 17:48:28 CDT 2014


Author: mjordan
Date: Sat Sep  6 17:48:24 2014
New Revision: 422769

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=422769
Log:
main/cdr: Copy over location information during a fork

When a CDR is forked, a new CDR is created and appended to the CDR chain for
the Party A. The forked CDR starts life off as a clone of the last
non-finalized for the particular Party A. In the past, merely copying over
the snapshots for Party A/Party B would be sufficient. However, as the CDRs
now contain cached information from Party A - specifically application/data,
context, and extension - we need to copy that over during a fork as well.

Huzzah for unit tests catching this when the context/extension were derived
from a cached value on the CDR instead of on Party A.

Modified:
    branches/12/main/cdr.c

Modified: branches/12/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/cdr.c?view=diff&rev=422769&r1=422768&r2=422769
==============================================================================
--- branches/12/main/cdr.c (original)
+++ branches/12/main/cdr.c Sat Sep  6 17:48:24 2014
@@ -3386,6 +3386,10 @@
 		}
 		new_cdr->fn_table = cdr_obj->fn_table;
 		ast_string_field_set(new_cdr, bridge, cdr->bridge);
+		ast_string_field_set(new_cdr, appl, cdr->appl);
+		ast_string_field_set(new_cdr, data, cdr->data);
+		ast_string_field_set(new_cdr, context, cdr->context);
+		ast_string_field_set(new_cdr, exten, cdr->exten);
 		new_cdr->flags = cdr->flags;
 		/* Explicitly clear the AST_CDR_LOCK_APP flag - we want
 		 * the application to be changed on the new CDR if the




More information about the asterisk-commits mailing list