aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-20 17:14:55 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-20 17:14:55 +0000
commit1643fa63cf953401a1d7dc6f5117e6cddbe6724a (patch)
tree188c295e95156b31bcb3ee7767c5936441e3927d
parentdd0c9f3ad6b00177a24f38d79cc1aea1e27ab22b (diff)
(closes issue #13263)
Reported by: brainy Tested by: murf The specialized reset routine is tromping on the flags field of the CDR. I made a change to not reset the DISABLED bit. This should get rid of this problem. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@139074 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/cdr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/main/cdr.c b/main/cdr.c
index 1df433c32..903bba0da 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -1073,12 +1073,15 @@ void ast_cdr_specialized_reset(struct ast_cdr *cdr, struct ast_flags *_flags)
if (_flags)
ast_copy_flags(&flags, _flags, AST_FLAGS_ALL);
-
- if (_flags)
- ast_copy_flags(&flags, _flags, AST_FLAGS_ALL);
/* Reset to initial state */
- ast_clear_flag(cdr, AST_FLAGS_ALL);
+ if (ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED)) { /* But do NOT lose the NoCDR() setting */
+ ast_clear_flag(cdr, AST_FLAGS_ALL);
+ ast_set_flag(cdr, AST_CDR_FLAG_POST_DISABLED);
+ } else {
+ ast_clear_flag(cdr, AST_FLAGS_ALL);
+ }
+
memset(&cdr->start, 0, sizeof(cdr->start));
memset(&cdr->end, 0, sizeof(cdr->end));
memset(&cdr->answer, 0, sizeof(cdr->answer));