From 6e9d6fdd0f411bccf815a0e835707ce057238047 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Tue, 28 Feb 2006 04:32:04 +0000 Subject: [PATCH] Fix for GCC 3.2.2 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11314 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_iax2.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index aff046d813..4a5e56faa5 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -4426,29 +4426,33 @@ static int iax2_show_threads(int fd, int argc, char *argv[]) ast_cli(fd, "IAX2 Thread Information\n"); time(&t); ast_cli(fd, "Idle Threads:\n"); +#ifdef DEBUG_SCHED_MULTITHREAD ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, { ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n", - iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount, -#ifdef DEBUG_SCHED_MULTITHREAD - iterator->curfunc -#else - "" -#endif - ); + iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount, iterator->curfunc); threadcount++; }); +#else + ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, { + ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d\n", + iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount); + threadcount++; + }); +#endif ast_cli(fd, "Active Threads:\n"); - ASTOBJ_CONTAINER_TRAVERSE(&activelist, 1, { - ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n", - iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount, #ifdef DEBUG_SCHED_MULTITHREAD - iterator->curfunc -#else - "" -#endif - ); + ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, { + ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d, func ='%s'\n", + iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount, iterator->curfunc); threadcount++; }); +#else + ASTOBJ_CONTAINER_TRAVERSE(&idlelist, 1, { + ast_cli(fd, "Thread %d: state=%d, update=%d, actions=%d, refcnt=%d\n", + iterator->threadnum, iterator->iostate, (int)(t - iterator->checktime), iterator->actions, iterator->refcount); + threadcount++; + }); +#endif ast_cli(fd, "%d of %d threads accounted for\n", threadcount, iaxthreadcount); return RESULT_SUCCESS; }