Skip to content

Instantly share code, notes, and snippets.

@bogdan-iancu
Created March 23, 2016 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan-iancu/fa596f4c99cda796e90a to your computer and use it in GitHub Desktop.
Save bogdan-iancu/fa596f4c99cda796e90a to your computer and use it in GitHub Desktop.
diff --git a/io_wait.h b/io_wait.h
index 79a5ae9..9e99ffb 100644
--- a/io_wait.h
+++ b/io_wait.h
@@ -351,10 +351,10 @@ inline static int io_watch_add( io_wait_h* h,
goto error;
}
#if defined (HAVE_EPOLL)
- LM_DBG("[%s] io_watch_add op (%d on %d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
+ LM_NOTICE("[%s] io_watch_add op (%d on %d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
h->name,fd,h->epfd, h,fd,type,data,flags,h->fd_no,h->max_fd_no);
#else
- LM_DBG("[%s] io_watch_add op (%d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
+ LM_NOTICE("[%s] io_watch_add op (%d) (%p, %d, %d, %p,%d), fd_no=%d/%d\n",
h->name,fd, h,fd,type,data,flags,h->fd_no,h->max_fd_no);
#endif
//fd_array_print;
@@ -596,7 +596,7 @@ inline static int io_watch_del(io_wait_h* h, int fd, int idx,
LM_CRIT("[%s] invalid fd %d, not in [0, %d)\n", h->name, fd, h->fd_no);
goto error0;
}
- LM_DBG("[%s] io_watch_del op on index %d %d (%p, %d, %d, 0x%x,0x%x) "
+ LM_NOTICE("[%s] io_watch_del op on index %d %d (%p, %d, %d, 0x%x,0x%x) "
"fd_no=%d called\n", h->name,idx,fd, h, fd, idx, flags,
sock_flags,h->fd_no);
//fd_array_print;
diff --git a/io_wait_loop.h b/io_wait_loop.h
index 07857d1..420422c 100644
--- a/io_wait_loop.h
+++ b/io_wait_loop.h
@@ -166,6 +166,10 @@ again:
}
}
for (r=0; r<n; r++) {
+ LM_NOTICE("[%s] triggering fd %d, events %d, flags %d\n",
+ h->name, ((struct fd_map*)h->ep_array[r].data.ptr)->fd,
+ h->ep_array[r].events, ((struct fd_map*)h->ep_array[r].data.ptr)->flags);
+
if (h->ep_array[r].events & EPOLLIN) {
if (h->ep_array[r].events&EPOLLHUP) {
LM_NOTICE("EPOLLIN(read) event: epollwait() "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment