]> git.ipfire.org Git - thirdparty/asterisk.git/commit
cdr.c: Eliminated many calls to ao2_global_obj_ref().
authorRichard Mudgett <rmudgett@digium.com>
Fri, 29 Sep 2017 19:26:41 +0000 (14:26 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 13 Oct 2017 00:11:02 +0000 (19:11 -0500)
commita8c6c3bd7d45f8e531faa22e19798caaac03a35c
tree9252d35848e204b8354ce4468d780bd9ce4b3195
parentb56fa63db8d329f3cf72a1727deb98aee889cda1
cdr.c: Eliminated many calls to ao2_global_obj_ref().

The CDR performance gets worse the further it gets behind in processing
stasis messages.  One of the reasons is we were getting the global config
to determine if we needed to log a debugging message.

* Many calls to ao2_global_obj_ref() were just so we could determine if
debug mode is enabled.  Made a global flag to check instead.

* Eliminated many RAII_VAR() usages associated with the remaining
ao2_global_obj_ref() calls.

* Added missing NULL checks for the returned ao2_global_obj_ref() value.

ASTERISK-27335

Change-Id: Iceaad93172862f610cad0188956634187bfcc7cd
main/cdr.c