1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-01-05 21:30:29 +00:00

removed some Debug-Code.

This commit is contained in:
Florian Westphal 2005-07-09 20:23:00 +00:00
parent 178b564c51
commit dd003e23b7

View File

@ -12,7 +12,7 @@
#include "portab.h" #include "portab.h"
static char UNUSED id[] = "$Id: io.c,v 1.1 2005/07/07 18:38:35 fw Exp $"; static char UNUSED id[] = "$Id: io.c,v 1.2 2005/07/09 20:23:00 fw Exp $";
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
@ -90,12 +90,6 @@ io_event_get(int fd)
i = (io_event *) array_get(&io_events, sizeof(io_event), fd); i = (io_event *) array_get(&io_events, sizeof(io_event), fd);
assert(i); assert(i);
if (!i) {
#ifdef DEBUG
Log(LOG_DEBUG, "io_event_add(): EMPTY FOR fd %d", fd);
#endif
return NULL;
}
return i; return i;
} }
@ -155,21 +149,15 @@ io_library_init(unsigned int eventsize)
} }
bool void
io_library_shutdown(void) io_library_shutdown(void)
{ {
unsigned int len = array_length(&io_events, sizeof(io_event)); #ifdef IO_USE_SELECT
while (len--) {
if (NULL == io_event_get(len))
continue;
}
#ifndef IO_USE_SELECT
close(io_masterfd); /* kqueue, epoll */
io_masterfd = -1;
#else
FD_ZERO(&readers); FD_ZERO(&readers);
FD_ZERO(&writers); FD_ZERO(&writers);
#else
close(io_masterfd); /* kqueue, epoll */
io_masterfd = -1;
#endif #endif
#ifdef IO_USE_KQUEUE #ifdef IO_USE_KQUEUE
array_free(&io_evcache); array_free(&io_evcache);
@ -331,8 +319,7 @@ io_event_add(int fd, short what)
if (i->what == what) if (i->what == what)
return true; return true;
#ifdef DEBUG #ifdef DEBUG
Log(LOG_DEBUG, "io_event_add(): fd %d (arg: %d), what %d.", i->fd, fd, Log(LOG_DEBUG, "io_event_add(): fd %d (arg: %d), what %d.", i->fd, fd, what);
what);
#endif #endif
i->what |= what; i->what |= what;
@ -407,12 +394,11 @@ io_event_del(int fd, short what)
#endif #endif
io_event *i = io_event_get(fd); io_event *i = io_event_get(fd);
#ifdef DEBUG #ifdef DEBUG
Log(LOG_DEBUG, "io_event_del(): trying to delete eventtype %d on fd %d", Log(LOG_DEBUG, "io_event_del(): trying to delete eventtype %d on fd %d", what, fd);
what, fd);
#endif #endif
assert(i); assert(i);
if (!i) if (!i)
return true; return false;
i->what &= ~what; i->what &= ~what;