Summary: | ASTERISK-24297: cdr.c: Minor code optimizations. | ||
Reporter: | Richard Mudgett (rmudgett) | Labels: | |
Date Opened: | 2014-09-03 15:57:00 | Date Closed: | 2017-12-18 08:37:11.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | CDR/General |
Versions: | 12.5.0 13.0.0-beta1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | From https://reviewboard.asterisk.org/r/3964/ I made a couple code optimization suggestions.
In bridge_candidate_process(): * Nothing cares about the return value. * The RAII_VAR and SCOPED_AO2LOCK can easily be eliminated by changing the "return 0" statements in the for loop to breaks. In handle_standard_bridge_enter_message(): * There is a tail recursion that could be eliminated by pulling the main for loop in the function into its own routine. Then the cdr lock also won't be recursively obtained. | ||
Comments: | By: Friendly Automation (friendly-automation) 2017-12-18 08:37:12.272-0600 Change 7607 merged by Jenkins2: cdr: Minor optimizations. [https://gerrit.asterisk.org/7607|https://gerrit.asterisk.org/7607] By: Friendly Automation (friendly-automation) 2017-12-18 08:46:50.998-0600 Change 7608 merged by Jenkins2: cdr: Minor optimizations. [https://gerrit.asterisk.org/7608|https://gerrit.asterisk.org/7608] By: Friendly Automation (friendly-automation) 2017-12-18 08:55:32.753-0600 Change 7609 merged by Jenkins2: cdr: Minor optimizations. [https://gerrit.asterisk.org/7609|https://gerrit.asterisk.org/7609] |