[Asterisk-code-review] Astobj2: Fix initialization order of refdebug and AO2 DEBUG. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Fri May 1 13:25:04 CDT 2015


Corey Farrell has uploaded a new change for review.

  https://gerrit.asterisk.org/328

Change subject: Astobj2: Fix initialization order of refdebug and AO2_DEBUG.
......................................................................

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.

ASTERISK-25048 #close
Reported by: Corey Farrell

Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244
---
M main/astobj2.c
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/28/328/1

diff --git a/main/astobj2.c b/main/astobj2.c
index f1d5001..b17c305 100644
--- a/main/astobj2.c
+++ b/main/astobj2.c
@@ -901,10 +901,6 @@
 	char ref_filename[1024];
 #endif
 
-	if (container_init() != 0) {
-		return -1;
-	}
-
 #ifdef REF_DEBUG
 	snprintf(ref_filename, sizeof(ref_filename), "%s/refs", ast_config_AST_LOG_DIR);
 	ref_log = fopen(ref_filename, "w");
@@ -913,6 +909,10 @@
 	}
 #endif
 
+	if (container_init() != 0) {
+		return -1;
+	}
+
 #if defined(AO2_DEBUG)
 	ast_cli_register_multiple(cli_astobj2, ARRAY_LEN(cli_astobj2));
 #endif	/* defined(AO2_DEBUG) */

-- 
To view, visit https://gerrit.asterisk.org/328
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>



More information about the asterisk-code-review mailing list