aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-21 14:49:21 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-21 14:49:21 +0000
commit27e0e17fc93fe480176a0dc8379178140f787909 (patch)
tree0610219ce014fe270f72ed2014a957fd3a329a73 /cli.c
parent8ebf64bdddc08384b4a8c848b9d6020066d0e59b (diff)
- use symbolic constants and macros to play with the debug flag
on the frame counters. Document it in the header file. - provide a single exit point for a function; - mark XXX some unclear parts of the code. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21933 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli.c b/cli.c
index 591652d3e..8aa7b8ac2 100644
--- a/cli.c
+++ b/cli.c
@@ -626,7 +626,6 @@ static int handle_debuglevel(int fd, int argc, char *argv[])
return RESULT_SUCCESS;
}
-#define DEBUGCHAN_FLAG 0x80000000
/* XXX todo: merge next two functions!!! */
static int handle_debugchan(int fd, int argc, char *argv[])
{
@@ -756,8 +755,10 @@ static int handle_showchan(int fd, int argc, char *argv[])
ast_getformatname_multiple(nf, sizeof(nf), c->nativeformats),
ast_getformatname_multiple(wf, sizeof(wf), c->writeformat),
ast_getformatname_multiple(rf, sizeof(rf), c->readformat),
- c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "",
- c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup,
+ c->fds[0],
+ c->fin & ~DEBUGCHAN_FLAG, (c->fin & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
+ c->fout & ~DEBUGCHAN_FLAG, (c->fout & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
+ (long)c->whentohangup,
cdrtime, c->_bridge ? c->_bridge->name : "<none>", ast_bridged_channel(c) ? ast_bridged_channel(c)->name : "<none>",
c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ),
( c-> data ? S_OR(c->data, "(Empty)") : "(None)"),