diff options
author | Matt Johnston <matt@ucc.asn.au> | 2004-06-03 18:08:34 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2004-06-03 18:08:34 +0000 |
commit | ae1b0b07cf0bfe3e4d8694409bd490ba8c325b95 (patch) | |
tree | 0d633bc0b52ece436ca86ee84581ce7058984a31 /listener.c | |
parent | 9847cfe73d073e7986304915702ebb0e2f99eb15 (diff) |
Fixed stupid agentfwd error (using the listening FD, not the accepted on. gah)
--HG--
extra : convert_revision : 27e793a6395dbf5f2c0aa130d37fad2e4ef67e01
Diffstat (limited to 'listener.c')
-rw-r--r-- | listener.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3,7 +3,7 @@ #include "session.h" #include "dbutil.h" -void listener_initialise() { +void listeners_initialise() { /* just one slot to start with */ ses.listeners = (struct Listener**)m_malloc(sizeof(struct Listener*)); @@ -21,6 +21,7 @@ void set_listener_fds(fd_set * readfds) { for (i = 0; i < ses.listensize; i++) { listener = ses.listeners[i]; if (listener != NULL) { + TRACE(("set listener fd %d", listener->sock)); FD_SET(listener->sock, readfds); } } @@ -36,6 +37,7 @@ void handle_listeners(fd_set * readfds) { for (i = 0; i < ses.listensize; i++) { listener = ses.listeners[i]; if (listener != NULL) { + TRACE(("handle listener num %d fd %d", i, listener->sock)); if (FD_ISSET(listener->sock, readfds)) { listener->accepter(listener); } @@ -80,6 +82,8 @@ struct Listener* new_listener(int sock, int type, void* typedata, ses.maxfd = MAX(ses.maxfd, sock); + TRACE(("new listener num %d fd %d", i, sock)); + newlisten = (struct Listener*)m_malloc(sizeof(struct Listener)); newlisten->index = i; newlisten->type = type; |