diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-06-24 18:51:41 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-06-24 18:51:41 +0000 |
commit | 80166c6de81bc173a7abb74e9a9d1c83f45badaa (patch) | |
tree | a48442a34e74ae91b6f1a3c6a9ebef7d943024c1 /main/io.c | |
parent | 2e4b41841d8813f43ac6d866619d3cdb1ef6d543 (diff) |
Conversions to ast_debug()
(issue #9984, patches from eliel and dimas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/io.c')
-rw-r--r-- | main/io.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -37,6 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/io.h" #include "asterisk/logger.h" #include "asterisk/utils.h" +#include "asterisk/options.h" #ifdef DEBUG_IO #define DEBUG DEBUG_M @@ -119,7 +120,7 @@ static int io_grow(struct io_context *ioc) { void *tmp; - DEBUG(ast_log(LOG_DEBUG, "io_grow()\n")); + DEBUG(ast_debug(1, "io_grow()\n")); ioc->maxfdcnt += GROW_SHRINK_SIZE; @@ -159,7 +160,7 @@ int *ast_io_add(struct io_context *ioc, int fd, ast_io_cb callback, short events { int *ret; - DEBUG(ast_log(LOG_DEBUG, "ast_io_add()\n")); + DEBUG(ast_debug(1, "ast_io_add()\n")); if (ioc->fdcnt >= ioc->maxfdcnt) { /* @@ -275,7 +276,7 @@ int ast_io_wait(struct io_context *ioc, int howlong) { int res, x, origcnt; - DEBUG(ast_log(LOG_DEBUG, "ast_io_wait()\n")); + DEBUG(ast_debug(1, "ast_io_wait()\n")); if ((res = poll(ioc->fds, ioc->fdcnt, howlong)) <= 0) return res; @@ -312,19 +313,19 @@ void ast_io_dump(struct io_context *ioc) */ int x; - ast_log(LOG_DEBUG, "Asterisk IO Dump: %d entries, %d max entries\n", ioc->fdcnt, ioc->maxfdcnt); - ast_log(LOG_DEBUG, "================================================\n"); - ast_log(LOG_DEBUG, "| ID FD Callback Data Events |\n"); - ast_log(LOG_DEBUG, "+------+------+-----------+-----------+--------+\n"); + ast_debug(1, "Asterisk IO Dump: %d entries, %d max entries\n", ioc->fdcnt, ioc->maxfdcnt); + ast_debug(1, "================================================\n"); + ast_debug(1, "| ID FD Callback Data Events |\n"); + ast_debug(1, "+------+------+-----------+-----------+--------+\n"); for (x = 0; x < ioc->fdcnt; x++) { - ast_log(LOG_DEBUG, "| %.4d | %.4d | %p | %p | %.6x |\n", + ast_debug(1, "| %.4d | %.4d | %p | %p | %.6x |\n", *ioc->ior[x].id, ioc->fds[x].fd, ioc->ior[x].callback, ioc->ior[x].data, ioc->fds[x].events); } - ast_log(LOG_DEBUG, "================================================\n"); + ast_debug(1, "================================================\n"); } /* Unrelated I/O functions */ |