diff options
author | Matthew Jordan <mjordan@digium.com> | 2014-09-06 22:50:24 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2014-09-06 22:50:24 +0000 |
commit | 71acca4de27a47bd71f0350562aaa1b7b10a7552 (patch) | |
tree | 76ad0a59c646e16d62b01e53844f2a1aba713b5d /main/cdr.c | |
parent | e4591f98b1235789c7341abb26ec52dd79d6090f (diff) |
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.
........
Merged revisions 422769 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 422770 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/cdr.c b/main/cdr.c index 5f2793ee8..823a9f13f 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -3386,6 +3386,10 @@ int ast_cdr_fork(const char *channel_name, struct ast_flags *options) } 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 |