diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-25 12:20:13 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-25 12:20:13 +0000 |
commit | 575f8d0fbc659a94231356962d5bfbdb93be4e66 (patch) | |
tree | dfc6d4198d3001ad340ad44bcd5f5af9968abe28 /src/socketengines/socketengine_poll.cpp | |
parent | 425c584feb52e504c59491b4cffc7528d51e32c4 (diff) |
Fixes to make poll(2) socket engine work properly
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10269 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengines/socketengine_poll.cpp')
-rw-r--r-- | src/socketengines/socketengine_poll.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp index 8a1ae6b9a..d6ae59334 100644 --- a/src/socketengines/socketengine_poll.cpp +++ b/src/socketengines/socketengine_poll.cpp @@ -21,11 +21,13 @@ PollEngine::PollEngine(InspIRCd* Instance) : SocketEngine(Instance) { // Poll requires no special setup (which is nice). CurrentSetSize = 0; + MAX_DESCRIPTORS = 0; ref = new EventHandler* [GetMaxFds()]; events = new struct pollfd[GetMaxFds()]; - memset(&events, 0, GetMaxFds() * sizeof(struct pollfd*)); + memset(events, 0, GetMaxFds() * sizeof(struct pollfd)); + memset(ref, 0, GetMaxFds() * sizeof(EventHandler*)); } PollEngine::~PollEngine() |