diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-12 11:50:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-12 11:50:45 +0000 |
commit | cef3e32fae0132d51b2fcca16ef05907b174e2a3 (patch) | |
tree | 6c56f7d3401068ee3e16486bcbd54a9151bc4b05 /src/commands.cpp | |
parent | 4f2e601fe71febf62db0f98a418a25598e24377b (diff) |
EXPERIMENTAL new socket engine code
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2326 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index a53d9ee00..0797c3f19 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -71,14 +71,9 @@ using namespace std; #include "dnsqueue.h" #include "helperfuncs.h" #include "hashcomp.h" +#include "socketengine.h" -#ifdef USE_KQUEUE -extern int kq; -#endif - -#ifdef USE_EPOLL -int ep; -#endif +extern SocketEngine* SE; extern int MODCOUNT; extern std::vector<Module*> modules; @@ -947,25 +942,7 @@ void handle_quit(char **parameters, int pcnt, userrec *user) /* push the socket on a stack of sockets due to be closed at the next opportunity */ if (user->fd > -1) { -#ifdef USE_KQUEUE - struct kevent ke; - EV_SET(&ke, user->fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); - int i = kevent(kq, &ke, 1, 0, 0, NULL); - if (i == -1) - { - log(DEBUG,"kqueue: Failed to remove user from queue!"); - } -#endif -#ifdef USE_EPOLL - struct epoll_event ev; - ev.events = EPOLLIN | EPOLLET; - ev.data.fd = user->fd; - int i = epoll_ctl(ep, EPOLL_CTL_DEL, user->fd, &ev); - if (i < 0) - { - log(DEBUG,"epoll: List deletion failure!"); - } -#endif + SE->DelFd(user->fd); user->CloseSocket(); } |