aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dumpchan.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-26 08:40:30 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-26 08:40:30 +0000
commit00c242bc76e50e7961725cfa83d90ed785c2ef51 (patch)
tree5bd8bad0233f80d55274d227a8ae3e126b4939a5 /apps/app_dumpchan.c
parent0b3daff9b4d10132341f87fc30b23d0805ea793d (diff)
- Formatting
- Don't name internal static functions ast_ - Expand the buffer for variables, since I almost always hit the limit on my channels git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35989 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dumpchan.c')
-rw-r--r--apps/app_dumpchan.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index 4ba386752..f57afe407 100644
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -50,25 +50,25 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *app = "DumpChan";
static char *synopsis = "Dump Info About The Calling Channel";
static char *desc =
-" DumpChan([<min_verbose_level>])\n"
-"Displays information on channel and listing of all channel\n"
-"variables. If min_verbose_level is specified, output is only\n"
-"displayed when the verbose level is currently set to that number\n"
-"or greater. \n";
+ " DumpChan([<min_verbose_level>])\n"
+ "Displays information on channel and listing of all channel\n"
+ "variables. If min_verbose_level is specified, output is only\n"
+ "displayed when the verbose level is currently set to that number\n"
+ "or greater. \n";
LOCAL_USER_DECL;
-static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
+static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
{
struct timeval now;
- long elapsed_seconds=0;
- int hour=0, min=0, sec=0;
+ long elapsed_seconds = 0;
+ int hour = 0, min = 0, sec = 0;
char cgrp[BUFSIZ/2];
char pgrp[BUFSIZ/2];
char formatbuf[BUFSIZ/2];
now = ast_tvnow();
- memset(buf,0,size);
+ memset(buf, 0, size);
if (!c)
return 0;
@@ -135,27 +135,25 @@ static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
static int dumpchan_exec(struct ast_channel *chan, void *data)
{
- int res=0;
struct localuser *u;
- char vars[1024];
+ char vars[BUFSIZ * 4];
char info[1024];
int level = 0;
static char *line = "================================================================================";
LOCAL_USER_ADD(u);
- if (!ast_strlen_zero(data)) {
+ if (!ast_strlen_zero(data))
level = atoi(data);
- }
pbx_builtin_serialize_variables(chan, vars, sizeof(vars));
- ast_serialize_showchan(chan, info, sizeof(info));
+ 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, line);
+ ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars, line);
LOCAL_USER_REMOVE(u);
- return res;
+ return 0;
}
static int unload_module(void *mod)