[asterisk-commits] file: branch group/stasis_cache_usage r392849 - /team/group/stasis_cache_usag...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 25 09:31:04 CDT 2013


Author: file
Date: Tue Jun 25 09:31:01 2013
New Revision: 392849

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392849
Log:
Add CDR variables back to "core show channel"

Modified:
    team/group/stasis_cache_usage/main/cli.c

Modified: team/group/stasis_cache_usage/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/team/group/stasis_cache_usage/main/cli.c?view=diff&rev=392849&r1=392848&r2=392849
==============================================================================
--- team/group/stasis_cache_usage/main/cli.c (original)
+++ team/group/stasis_cache_usage/main/cli.c Tue Jun 25 09:31:01 2013
@@ -1415,7 +1415,7 @@
 	struct ast_channel_snapshot *snapshot;
 	struct timeval now;
 	char cdrtime[256];
-	struct ast_str *obuf;/*!< Buffer for variable, CDR variable, and trace output. */
+	struct ast_str *obuf;/*!< Buffer for CDR variables. */
 	struct ast_str *output;/*!< Accumulation buffer for all output. */
 	long elapsed_seconds=0;
 	int hour=0, min=0, sec=0;
@@ -1534,6 +1534,10 @@
 		ast_str_append(&output, 0, "%s=%s\n", ast_var_name(var), ast_var_value(var));
 	}
 
+	if (ast_cdr_serialize_variables(snapshot->name, &obuf, '=', '\n')) {
+		ast_str_append(&output, 0, "  CDR Variables:\n%s\n", ast_str_buffer(obuf));
+	}
+
 	ast_cli(a->fd, "%s", ast_str_buffer(output));
 	ast_free(output);
 	return CLI_SUCCESS;




More information about the asterisk-commits mailing list