diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-20 17:25:07 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-20 17:25:07 +0000 |
commit | 2234a09e07ac297ce817193aaae424cf7e08b570 (patch) | |
tree | 563a427d9c86f19aced3eb55363fa64f9545a701 /main/cdr.c | |
parent | fc653ba3a5397ae3b8599c353846348ec848b0b8 (diff) |
Merged revisions 139074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r139074 | murf | 2008-08-20 11:14:55 -0600 (Wed, 20 Aug 2008) | 12 lines
(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/trunk@139083 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/main/cdr.c b/main/cdr.c index 23003e54f..6bf60b8a7 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1081,12 +1081,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)); |