Merge anthm's CDR updates (bug #3595)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-02-23 22:48:47 +00:00
parent 7954654d15
commit b6c4282a03
8 changed files with 469 additions and 45 deletions

9
cli.c
View File

@@ -651,10 +651,11 @@ static int handle_showchan(int fd, int argc, char *argv[])
{
struct ast_channel *c=NULL;
struct timeval now;
char buf[1024];
char buf[2048];
char cdrtime[256];
long elapsed_seconds=0;
int hour=0, min=0, sec=0;
if (argc != 3)
return RESULT_SHOWUSAGE;
gettimeofday(&now, NULL);
@@ -709,9 +710,11 @@ static int handle_showchan(int fd, int argc, char *argv[])
( 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);
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);
ast_mutex_unlock(&c->lock);
break;
}
ast_mutex_unlock(&c->lock);