mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 06:18:38 +00:00
Merge Russell's formatting patch (bug #3838)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
89
cli.c
89
cli.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user