Merge "main/cdr: Allow setting properties on a finalized CDR if it is the last one"
authorMatt Jordan <mjordan@digium.com>
Mon, 4 Jan 2016 15:02:53 +0000 (09:02 -0600)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Mon, 4 Jan 2016 15:02:54 +0000 (09:02 -0600)
main/cdr.c

index b5df79f..b6a0b42 100644 (file)
@@ -2976,7 +2976,7 @@ int ast_cdr_setvar(const char *channel_name, const char *name, const char *value
                for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
                        struct varshead *headp = NULL;
 
-                       if (it_cdr->fn_table == &finalized_state_fn_table) {
+                       if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) {
                                continue;
                        }
                        if (!strcasecmp(channel_name, it_cdr->party_a.snapshot->name)) {