aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dumpchan.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-04 11:00:12 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-04 11:00:12 +0000
commit2f74da0c495ef2a7861be94f3eddfeb4cf73c335 (patch)
tree954d772bae06b4b0d07d4117e8f8c763b3548480 /apps/app_dumpchan.c
parent275d3b04c46b0551bb15e6ae5dc237bc993d94ce (diff)
Add formats in text form to dumpchan()
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32003 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dumpchan.c')
-rw-r--r--apps/app_dumpchan.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index 5124cc2c4..b0dbb01ef 100644
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -62,8 +62,9 @@ static int ast_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;
- char cgrp[256];
- char pgrp[256];
+ char cgrp[BUFSIZ/2];
+ char pgrp[BUFSIZ/2];
+ char formatbuf[BUFSIZ/2];
now = ast_tvnow();
memset(buf,0,size);
@@ -86,9 +87,9 @@ static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
"DNIDDigits= %s\n"
"State= %s (%d)\n"
"Rings= %d\n"
- "NativeFormat= %d\n"
- "WriteFormat= %d\n"
- "ReadFormat= %d\n"
+ "NativeFormat= %d %s\n"
+ "WriteFormat= %d %s\n"
+ "ReadFormat= %d %s\n"
"1stFileDescriptor= %d\n"
"Framesin= %d %s\n"
"Framesout= %d %s\n"
@@ -112,8 +113,11 @@ static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
c->_state,
c->rings,
c->nativeformats,
+ ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->nativeformats),
c->writeformat,
+ ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->writeformat),
c->readformat,
+ ast_getformatname_multiple(formatbuf, sizeof(formatbuf), c->readformat),
c->fds[0], c->fin & ~DEBUGCHAN_FLAG, (c->fin & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
c->fout & ~DEBUGCHAN_FLAG, (c->fout & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "", (long)c->whentohangup,
hour,