@ -3408,16 +3408,16 @@ static int action_reload(struct mansession *s, const struct message *m)
static int action_coreshowchannels ( struct mansession * s , const struct message * m )
static int action_coreshowchannels ( struct mansession * s , const struct message * m )
{
{
const char * actionid = astman_get_header ( m , " ActionID " ) ;
const char * actionid = astman_get_header ( m , " ActionID " ) ;
char actionidt ext[ 256 ] ;
char idT ext[ 256 ] ;
struct ast_channel * c = NULL ;
struct ast_channel * c = NULL ;
int numchans = 0 ;
int numchans = 0 ;
int duration , durh , durm , durs ;
int duration , durh , durm , durs ;
struct ast_channel_iterator * iter ;
struct ast_channel_iterator * iter ;
if ( ! ast_strlen_zero ( actionid ) ) {
if ( ! ast_strlen_zero ( actionid ) ) {
snprintf ( actionidtext, sizeof ( actionidt ext) , " ActionID: %s \r \n " , actionid ) ;
snprintf ( idText, sizeof ( idT ext) , " ActionID: %s \r \n " , actionid ) ;
} else {
} else {
actionidt ext[ 0 ] = ' \0 ' ;
idT ext[ 0 ] = ' \0 ' ;
}
}
if ( ! ( iter = ast_channel_iterator_all_new ( 0 ) ) ) {
if ( ! ( iter = ast_channel_iterator_all_new ( 0 ) ) ) {
@ -3444,6 +3444,7 @@ static int action_coreshowchannels(struct mansession *s, const struct message *m
astman_append ( s ,
astman_append ( s ,
" Event: CoreShowChannel \r \n "
" Event: CoreShowChannel \r \n "
" %s "
" Channel: %s \r \n "
" Channel: %s \r \n "
" UniqueID: %s \r \n "
" UniqueID: %s \r \n "
" Context: %s \r \n "
" Context: %s \r \n "
@ -3458,8 +3459,8 @@ static int action_coreshowchannels(struct mansession *s, const struct message *m
" AccountCode: %s \r \n "
" AccountCode: %s \r \n "
" BridgedChannel: %s \r \n "
" BridgedChannel: %s \r \n "
" BridgedUniqueID: %s \r \n "
" BridgedUniqueID: %s \r \n "
" \r \n " , c- > name , c - > uniqueid , c - > context , c - > exten , c - > priority , c - > _state , ast_state2str ( c - > _state ) ,
" \r \n " , idText, c- > name , c - > uniqueid , c - > context , c - > exten , c - > priority , c - > _state ,
c - > appl ? c - > appl : " " , c - > data ? S_OR ( c - > data , " " ) : " " ,
ast_state2str ( c - > _state ) , c - > appl ? c - > appl : " " , c - > data ? S_OR ( c - > data , " " ) : " " ,
S_OR ( c - > cid . cid_num , " " ) , durbuf , S_OR ( c - > accountcode , " " ) , bc ? bc - > name : " " , bc ? bc - > uniqueid : " " ) ;
S_OR ( c - > cid . cid_num , " " ) , durbuf , S_OR ( c - > accountcode , " " ) , bc ? bc - > name : " " , bc ? bc - > uniqueid : " " ) ;
ast_channel_unlock ( c ) ;
ast_channel_unlock ( c ) ;
@ -3472,7 +3473,7 @@ static int action_coreshowchannels(struct mansession *s, const struct message *m
" EventList: Complete \r \n "
" EventList: Complete \r \n "
" ListItems: %d \r \n "
" ListItems: %d \r \n "
" %s "
" %s "
" \r \n " , numchans , actionidt ext) ;
" \r \n " , numchans , idT ext) ;
ast_channel_iterator_destroy ( iter ) ;
ast_channel_iterator_destroy ( iter ) ;