summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-03 16:03:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-03 16:03:10 +0000
commit3079075ad62820fd6661c0368970178d71bbfe98 (patch)
tree1a0571ebac9f81f40c4e2f1d90e6d4a44ec95cf2
parent561ca4e2562c1e7a745bd942b7c87d2cd8bfdb5e (diff)
Fix socketengine select to work with arsey compilers that think we're using ISO C++
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9287 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/socketengines/socketengine_select.h2
-rw-r--r--src/socketengines/socketengine_select.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/include/socketengines/socketengine_select.h b/include/socketengines/socketengine_select.h
index 3540c0944..0131297f1 100644
--- a/include/socketengines/socketengine_select.h
+++ b/include/socketengines/socketengine_select.h
@@ -41,6 +41,8 @@ private:
/** The read set and write set, populated before each call to select().
*/
fd_set wfdset, rfdset, errfdset;
+
+ EventHandler** ev;
public:
/** Create a new SelectEngine
* @param Instance The creator of this object
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index 5a5d61147..24c3d5637 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -27,11 +27,13 @@ SelectEngine::SelectEngine(InspIRCd* Instance) : SocketEngine(Instance)
memset(writeable, 0, sizeof(writeable));
ref = new EventHandler* [GetMaxFds()];
memset(ref, 0, GetMaxFds() * sizeof(EventHandler*));
+ ev = new EventHandler* [GetMaxFds()];
}
SelectEngine::~SelectEngine()
{
delete[] ref;
+ delete[] ev;
}
bool SelectEngine::AddFd(EventHandler* eh)
@@ -92,7 +94,6 @@ int SelectEngine::DispatchEvents()
int result = 0;
timeval tval;
int sresult = 0;
- EventHandler* ev[GetMaxFds()];
socklen_t codesize;
int errcode;