#include "asterisk/io.h"
#include "asterisk/logger.h"
#include "asterisk/utils.h"
+#include "asterisk/options.h"
#ifdef DEBUG_IO
#define DEBUG DEBUG_M
{
void *tmp;
- DEBUG(ast_log(LOG_DEBUG, "io_grow()\n"));
+ DEBUG(ast_debug(1, "io_grow()\n"));
ioc->maxfdcnt += GROW_SHRINK_SIZE;
{
int *ret;
- DEBUG(ast_log(LOG_DEBUG, "ast_io_add()\n"));
+ DEBUG(ast_debug(1, "ast_io_add()\n"));
if (ioc->fdcnt >= ioc->maxfdcnt) {
/*
{
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;
*/
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 */