mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 04:16:43 +00:00
Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user