summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_mysql.cpp4
-rw-r--r--src/socketengine.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index a16a293d7..4ee6de527 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -145,7 +145,7 @@ class MySQLresult : public SQL::Result
std::vector<std::string> colnames;
std::vector<SQL::Row> fieldlists;
- MySQLresult(MYSQL_RES* res, int affected_rows) : err(SQL::NO_ERROR), currentrow(0), rows(0)
+ MySQLresult(MYSQL_RES* res, int affected_rows) : err(SQL::SUCCESS), currentrow(0), rows(0)
{
if (affected_rows >= 1)
{
@@ -541,7 +541,7 @@ void DispatcherThread::OnNotify()
for(ResultQueue::iterator i = Parent->rq.begin(); i != Parent->rq.end(); i++)
{
MySQLresult* res = i->r;
- if (res->err.code == SQL::NO_ERROR)
+ if (res->err.code == SQL::SUCCESS)
i->q->OnResult(*res);
else
i->q->OnError(res->err);
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index 10a0e51a2..df6ff5a02 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -71,6 +71,9 @@ void SocketEngine::InitError()
void SocketEngine::LookupMaxFds()
{
+#if defined _WIN32
+ MaxSetSize = FD_SETSIZE;
+#else
struct rlimit limits;
if (!getrlimit(RLIMIT_NOFILE, &limits))
MaxSetSize = limits.rlim_cur;
@@ -82,6 +85,7 @@ void SocketEngine::LookupMaxFds()
#endif
if (!setrlimit(RLIMIT_NOFILE, &limits))
MaxSetSize = limits.rlim_cur;
+#endif
}
void SocketEngine::ChangeEventMask(EventHandler* eh, int change)