aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dumpchan.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-13 08:36:35 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-13 08:36:35 +0000
commita41b34a63c52608e7e5c8e6aced613815461f4c2 (patch)
tree0559c99680217b78c0bda37a131b5f09794f43c6 /apps/app_dumpchan.c
parentb298a3aa9b396c4055bf75104b4fb89212c44d4a (diff)
Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dumpchan.c')
-rw-r--r--apps/app_dumpchan.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index d3bf17f6c..c598bee75 100644
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -35,6 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
+#include "asterisk/app.h"
/*** DOCUMENTATION
<application name="DumpChan" language="en_US">
@@ -148,7 +149,7 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
static int dumpchan_exec(struct ast_channel *chan, void *data)
{
- struct ast_str *vars = ast_str_alloca(BUFSIZ * 4); /* XXX very large! */
+ struct ast_str *vars = ast_str_thread_get(&global_app_buf, 16);
char info[1024];
int level = 0;
static char *line = "================================================================================";
@@ -156,10 +157,11 @@ static int dumpchan_exec(struct ast_channel *chan, void *data)
if (!ast_strlen_zero(data))
level = atoi(data);
- pbx_builtin_serialize_variables(chan, &vars);
- serialize_showchan(chan, info, sizeof(info));
- if (option_verbose >= level)
- ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars->str, line);
+ if (option_verbose >= level) {
+ serialize_showchan(chan, info, sizeof(info));
+ pbx_builtin_serialize_variables(chan, &vars);
+ ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, ast_str_buffer(vars), line);
+ }
return 0;
}