[asterisk-commits] trunk r32003 - /trunk/apps/app_dumpchan.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jun 4 04:00:13 MST 2006
Author: oej
Date: Sun Jun 4 06:00:12 2006
New Revision: 32003
URL: http://svn.digium.com/view/asterisk?rev=32003&view=rev
Log:
Add formats in text form to dumpchan()
Modified:
trunk/apps/app_dumpchan.c
Modified: trunk/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dumpchan.c?rev=32003&r1=32002&r2=32003&view=diff
==============================================================================
--- trunk/apps/app_dumpchan.c (original)
+++ trunk/apps/app_dumpchan.c Sun Jun 4 06:00:12 2006
@@ -62,8 +62,9 @@
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 @@
"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 @@
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,
More information about the asterisk-commits
mailing list