]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Astobj2: Fix initialization order of refdebug and AO2_DEBUG. 28/328/3
authorCorey Farrell <git@cfware.com>
Fri, 1 May 2015 18:22:03 +0000 (14:22 -0400)
committerCorey Farrell <git@cfware.com>
Fri, 1 May 2015 19:40:45 +0000 (15:40 -0400)
commit5875bf183c255f19ededdb1004f35fd15cd1e6cf
tree31ad8c8b70393de7f826f634795c339056c98192
parentec0f80b6e8d5f6952bdf48e8f19a024ebc64840e
Astobj2: Fix initialization order of refdebug and AO2_DEBUG.

This ensures that refdebug is initialized before AO2_DEBUG if
both are enabled, since AO2_DEBUG allocates a container.

This change also makes AO2_DEBUG initialization critical, a
failure will abort Asterisk startup.  This is needed since
the failure would be caused by reg_containers allocation
failure, and that would result in a segmentation fault by
ao2_container_register later in startup.

ASTERISK-25048 #close
Reported by: Corey Farrell

Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244
main/asterisk.c
main/astobj2.c