[Asterisk-cvs] asterisk/apps app_dumpchan.c,1.4,1.5
markster at lists.digium.com
markster at lists.digium.com
Sun Jan 2 18:46:40 CST 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv353/apps
Modified Files:
app_dumpchan.c
Log Message:
Merge OEJ's print groups feature (bug #3228, with changes)
Index: app_dumpchan.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dumpchan.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- app_dumpchan.c 7 Dec 2004 20:38:43 -0000 1.4
+++ app_dumpchan.c 3 Jan 2005 00:51:57 -0000 1.5
@@ -19,6 +19,7 @@
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <asterisk/lock.h>
+#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@@ -29,9 +30,9 @@
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"
+"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. Always returns 0.\n\n";
+"or greater. Always returns 0.\n\n";
STANDARD_LOCAL_USER;
@@ -42,6 +43,9 @@
struct timeval now;
long elapsed_seconds=0;
int hour=0, min=0, sec=0;
+ char cgrp[256];
+ char pgrp[256];
+
gettimeofday(&now, NULL);
memset(buf,0,size);
if (!c)
@@ -55,30 +59,30 @@
}
snprintf(buf,size,
- "Name=%s\n"
- "Type=%s\n"
- "UniqueID=%s\n"
- "CallerID=%s\n"
- "CallerIDName=%s\n"
- "DNIDDigits=%s\n"
- "State=%s(%d)\n"
- "Rings=%d\n"
- "NativeFormat=%d\n"
- "WriteFormat=%d\n"
- "ReadFormat=%d\n"
- "1stFileDescriptor=%d\n"
- "Framesin=%d%s\n"
- "Framesout=%d%s\n"
- "TimetoHangup=%ld\n"
- "ElapsedTime=%dh%dm%ds\n"
- "Context=%s\n"
- "Extension=%s\n"
- "Priority=%d\n"
- "CallGroup=%d\n"
- "PickupGroup=%d\n"
- "Application=%s\n"
- "Data=%s\n"
- "Blocking_in=%s\n",
+ "Name= %s\n"
+ "Type= %s\n"
+ "UniqueID= %s\n"
+ "CallerID= %s\n"
+ "CallerIDName= %s\n"
+ "DNIDDigits= %s\n"
+ "State= %s (%d)\n"
+ "Rings= %d\n"
+ "NativeFormat= %d\n"
+ "WriteFormat= %d\n"
+ "ReadFormat= %d\n"
+ "1stFileDescriptor= %d\n"
+ "Framesin= %d %s\n"
+ "Framesout= %d %s\n"
+ "TimetoHangup= %ld\n"
+ "ElapsedTime= %dh%dm%ds\n"
+ "Context= %s\n"
+ "Extension= %s\n"
+ "Priority= %d\n"
+ "CallGroup= %s\n"
+ "PickupGroup= %s\n"
+ "Application= %s\n"
+ "Data= %s\n"
+ "Blocking_in= %s\n",
c->name,
c->type,
c->uniqueid,
@@ -99,8 +103,8 @@
c->context,
c->exten,
c->priority,
- c->callgroup,
- c->pickupgroup,
+ ast_print_group(cgrp, sizeof(cgrp), c->callgroup),
+ ast_print_group(pgrp, sizeof(pgrp), c->pickupgroup),
( c->appl ? c->appl : "(N/A)" ),
( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
@@ -125,7 +129,7 @@
pbx_builtin_serialize_variables(chan, vars, sizeof(vars));
ast_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;
More information about the svn-commits
mailing list