[Asterisk-code-review] Fix 'core show channel' CDR variable printing. (asterisk[master])

snuffy asteriskteam at digium.com
Fri May 15 02:01:49 CDT 2015


snuffy has uploaded a new change for review.

  https://gerrit.asterisk.org/477

Change subject: Fix 'core show channel' CDR variable printing.
......................................................................

Fix 'core show channel' CDR variable printing.

When the new Bridging API was implemented, workspace variable
changed to a malloc'd string, causing sizeof() to always be 8 (char).

Revert back to static string for workspace.

ASTERISK-25090 #close

Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7
---
M main/cdr.c
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/477/1

diff --git a/main/cdr.c b/main/cdr.c
index 9b32f9d..c6f49f1 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -3096,12 +3096,8 @@
 	struct cdr_object *it_cdr;
 	struct ast_var_t *variable;
 	const char *var;
-	RAII_VAR(char *, workspace, ast_malloc(256), ast_free);
+	char workspace[256];
 	int total = 0, x = 0, i;
-
-	if (!workspace) {
-		return 0;
-	}
 
 	if (!cdr) {
 		RAII_VAR(struct module_config *, mod_cfg,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: snuffy <snuffy22 at gmail.com>



More information about the asterisk-code-review mailing list