From 4f948c82ea95c6b9fac307f455fe91851e27017a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 8 Oct 2013 23:09:49 +0300 Subject: split network mutexe into read and write mutexes. --- src/net/eathena/network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 4786d9ee7..481a945ba 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -162,7 +162,7 @@ void Network::dispatchMessages() { while (messageReady()) { - SDL_mutexP(mMutex); + SDL_mutexP(mMutexIn); const int msgId = readWord(0); int len = -1; if (msgId == SMSG_SERVER_VERSION_RESPONSE) @@ -183,7 +183,7 @@ void Network::dispatchMessages() len = readWord(2); MessageIn msg(mInBuffer, len); - SDL_mutexV(mMutex); + SDL_mutexV(mMutexIn); if (len == 0) { @@ -210,7 +210,7 @@ bool Network::messageReady() { int len = -1; - SDL_mutexP(mMutex); + SDL_mutexP(mMutexIn); if (mInSize >= 2) { const int msgId = readWord(0); @@ -226,7 +226,7 @@ bool Network::messageReady() } const bool ret = (mInSize >= static_cast(len)); - SDL_mutexV(mMutex); + SDL_mutexV(mMutexIn); return ret; } -- cgit v1.2.3-70-g09d2