diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-03-02 03:17:04 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-03-02 03:17:04 +0000 |
commit | a018f26eddbc72fdbf87fe5ee89112a53311fff1 (patch) | |
tree | 24c0de6f5e2fbaa8a17ed38bf81d0bd70b452e5b /src/socketengines/socketengine_select.cpp | |
parent | ac83d3b0d607f2bdc373365bc2f08f0cde023bf3 (diff) |
DelFd should not fail, it will leave a bad dangling pointer in that case
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12584 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengines/socketengine_select.cpp')
-rw-r--r-- | src/socketengines/socketengine_select.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index 3c33eb474..acc8f8f09 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -32,7 +32,7 @@ public: */ virtual ~SelectEngine(); virtual bool AddFd(EventHandler* eh, int event_mask); - virtual bool DelFd(EventHandler* eh, bool force = false); + virtual void DelFd(EventHandler* eh); void OnSetEvent(EventHandler* eh, int, int); virtual int DispatchEvents(); virtual std::string GetName(); @@ -69,18 +69,17 @@ bool SelectEngine::AddFd(EventHandler* eh, int event_mask) return true; } -bool SelectEngine::DelFd(EventHandler* eh, bool force) +void SelectEngine::DelFd(EventHandler* eh) { int fd = eh->GetFd(); if ((fd < 0) || (fd > GetMaxFds() - 1)) - return false; + return; CurrentSetSize--; ref[fd] = NULL; ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd); - return true; } void SelectEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask) |