#include "ircd_log.h"
#include "s_debug.h"
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_STDINT_H
static void
engine_delete(struct Socket *sock)
{
- struct epoll_event evt;
-
assert(0 != sock);
- memset(&evt, 0, sizeof(evt));
Debug((DEBUG_ENGINE, "epoll: Deleting socket %d [%p], state %s",
s_fd(sock), sock, state_to_name(s_state(sock))));
- if (epoll_ctl(epoll_fd, EPOLL_CTL_DEL, s_fd(sock), &evt) < 0)
- log_write(LS_SOCKET, L_WARNING, 0,
- "Unable to delete epoll item for socket %d", s_fd(sock));
+ /* No action necessary; epoll removes the socket on close(). */
}
/** Run engine event loop.
{
struct epoll_event *events;
struct Socket *sock;
- size_t codesize;
+ socklen_t codesize;
int events_count, i, wait, nevs, errcode;
if ((events_count = feature_int(FEAT_POLLS_PER_LOOP)) < 20)
}
timer_run();
}
+ MyFree(events);
}
/** Descriptor for dpoll event engine. */