diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-23 05:56:32 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-23 05:56:32 +0000 |
commit | 4a7019a16af31fc5be3bd46a753805760cde5da9 (patch) | |
tree | facf25d45bde66df632cfdb514fe09da93cc4386 /cli.c | |
parent | 2b84c4638e6085cb34c3173677e67ea55c42c7c7 (diff) |
Merge Russell's formatting patch (bug #3838)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5234 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-x | cli.c | 89 |
1 files changed, 45 insertions, 44 deletions
@@ -377,7 +377,7 @@ static int handle_modlist(int fd, int argc, char *argv[]) if (argc == 3) return RESULT_SHOWUSAGE; else if (argc >= 4) { - if ( strcmp(argv[2],"like") ) + if (strcmp(argv[2],"like")) return RESULT_SHOWUSAGE; like = argv[3]; } @@ -694,51 +694,52 @@ static int handle_showchan(int fd, int argc, char *argv[]) } else strncpy(cdrtime, "N/A", sizeof(cdrtime) -1); ast_cli(fd, - " -- General --\n" - " Name: %s\n" - " Type: %s\n" - " UniqueID: %s\n" - " Caller ID: %s\n" - " Caller ID Name: %s\n" - " DNID Digits: %s\n" - " State: %s (%d)\n" - " Rings: %d\n" - " NativeFormat: %d\n" - " WriteFormat: %d\n" - " ReadFormat: %d\n" - "1st File Descriptor: %d\n" - " Frames in: %d%s\n" - " Frames out: %d%s\n" - " Time to Hangup: %ld\n" - " Elapsed Time: %s\n" - " Direct Bridge: %s\n" - "Indirect Bridge: %s\n" - " -- PBX --\n" - " Context: %s\n" - " Extension: %s\n" - " Priority: %d\n" - " Call Group: %d\n" - " Pickup Group: %d\n" - " Application: %s\n" - " Data: %s\n" - " Blocking in: %s\n", - c->name, c->type, c->uniqueid, - (c->cid.cid_num ? c->cid.cid_num : "(N/A)"), - (c->cid.cid_name ? c->cid.cid_name : "(N/A)"), - (c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat, - c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "", - c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (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 ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"), - (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)")); - if(pbx_builtin_serialize_variables(c,buf,sizeof(buf))) - ast_cli(fd," Variables:\n%s\n",buf); - if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1)) - ast_cli(fd," CDR Variables:\n%s\n",buf); + " -- General --\n" + " Name: %s\n" + " Type: %s\n" + " UniqueID: %s\n" + " Caller ID: %s\n" + " Caller ID Name: %s\n" + " DNID Digits: %s\n" + " State: %s (%d)\n" + " Rings: %d\n" + " NativeFormat: %d\n" + " WriteFormat: %d\n" + " ReadFormat: %d\n" + "1st File Descriptor: %d\n" + " Frames in: %d%s\n" + " Frames out: %d%s\n" + " Time to Hangup: %ld\n" + " Elapsed Time: %s\n" + " Direct Bridge: %s\n" + "Indirect Bridge: %s\n" + " -- PBX --\n" + " Context: %s\n" + " Extension: %s\n" + " Priority: %d\n" + " Call Group: %d\n" + " Pickup Group: %d\n" + " Application: %s\n" + " Data: %s\n" + " Blocking in: %s\n", + c->name, c->type, c->uniqueid, + (c->cid.cid_num ? c->cid.cid_num : "(N/A)"), + (c->cid.cid_name ? c->cid.cid_name : "(N/A)"), + (c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat, + c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "", + c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (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 ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"), + (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)")); + + if(pbx_builtin_serialize_variables(c,buf,sizeof(buf))) + ast_cli(fd," Variables:\n%s\n",buf); + if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1)) + ast_cli(fd," CDR Variables:\n%s\n",buf); ast_mutex_unlock(&c->lock); - break; + break; } ast_mutex_unlock(&c->lock); c = ast_channel_walk_locked(c); |