X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=14b2abb3ea2e77d7134109d177089f8f9a73687b;hb=bf6ec00f3dc5ae23da1e8a4e20d44555eca0593a;hp=c0dcc3ca7e60fc867f67d92b0ba7168ae2d51b2c;hpb=636f32fcd0ac8bdd5bb70e04b6205d9980ef344e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index c0dcc3ca7..14b2abb3e 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -14,17 +14,25 @@ * --------------------------------------------------- */ +using namespace std; + +#include "inspircd_config.h" #include "inspircd.h" #include "inspircd_io.h" #include "inspircd_util.h" -#include "inspircd_config.h" #include #include + #ifdef USE_KQUEUE #include #include #include #endif + +#ifdef USE_EPOLL +#include +#endif + #include #include #ifdef GCC3 @@ -52,12 +60,14 @@ #include "helperfuncs.h" #include "hashcomp.h" -using namespace std; - #ifdef USE_KQUEUE extern int kq; #endif +#ifdef USE_EPOLL +int ep; +#endif + extern int MODCOUNT; extern std::vector modules; extern std::vector factory; @@ -88,7 +98,6 @@ extern int NetBufferSize; extern int MaxWhoResults; extern time_t nb_start; -extern std::vector fd_reap; extern std::vector module_names; extern int boundPortCount; @@ -622,6 +631,17 @@ bool Server::UserToPseudo(userrec* user,std::string message) log(DEBUG,"kqueue: Failed to remove user from queue!"); } #endif +#ifdef USE_EPOLL + struct epoll_event ev; + ev.events = EPOLLIN | EPOLLET; + ev.data.fd = old_fd; + int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); + if (i < 0) + { + log(DEBUG,"epoll: List deletion failure!"); + } +#endif + shutdown(old_fd,2); close(old_fd); }