Summary: | ASTERISK-10250: not optimal CDR lock flag check | ||
Reporter: | Dmytro Mishchenko (arkadia) | Labels: | |
Date Opened: | 2007-09-07 05:22:11 | Date Closed: | 2007-09-11 10:16:13 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | CDR/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) cdr_lockorder.patch | |
Description: | In cdr.c in functions where we check AST_CDR_FLAG_LOCKED flag it should be done as a first thing. Here in common patterns from the code: for (; cdr; cdr = cdr->next) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { ..... } } OR while (cdr) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { ..... } cdr = cdr->next; } Function ast_cdr_failed, ast_cdr_noanswer, ast_cdr_setdestchan should be changed to match this idea, course they do some other stuff prior checking AST_CDR_FLAG_LOCKED which may be not required at all. I've prepared patch for this change. | ||
Comments: | By: Tilghman Lesher (tilghman) 2007-09-07 08:07:59 Unless this is a change fixing a bug, optimizations should be made against trunk, not against 1.4. By: Dmytro Mishchenko (arkadia) 2007-09-07 08:49:24 Corydon76: thats right. I've tested this patch against trunk and it clearly applies with "offset -2 lines". So I assume there is no requirements on uploading new patch for now. By: Digium Subversion (svnbot) 2007-09-11 10:16:12 Repository: asterisk Revision: 82248 ------------------------------------------------------------------------ r82248 | file | 2007-09-11 10:16:12 -0500 (Tue, 11 Sep 2007) | 6 lines (closes issue ASTERISK-10250) Reported by: arkadia Patches: cdr_lockorder.patch uploaded by arkadia (license 233) Optimize CDR stuff a bit. ------------------------------------------------------------------------ |