X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d1d9452a687184ac6b992fadc77e89c8a308e388..0907aa4037b12b6b88ee24495d4577a064d4f8db:/projects/rscriptd/listener.cpp diff --git a/projects/rscriptd/listener.cpp b/projects/rscriptd/listener.cpp index 9fe4c0f0..3d8fd48e 100644 --- a/projects/rscriptd/listener.cpp +++ b/projects/rscriptd/listener.cpp @@ -36,6 +36,7 @@ #include "stg/scriptexecuter.h" #include "stg/locker.h" #include "stg/common.h" +#include "stg/const.h" #include "listener.h" void InitEncrypt(BLOWFISH_CTX * ctx, const std::string & password); @@ -43,7 +44,7 @@ void Decrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8); //----------------------------------------------------------------------------- LISTENER::LISTENER() - : WriteServLog(GetStgLogger()), + : WriteServLog(STG::Logger::get()), port(0), running(false), receiverStopped(true), @@ -311,7 +312,7 @@ else if (packetHead.packetType == RS_DISCONNECT_PACKET) } } -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); pending.push_back(data); return false; @@ -396,6 +397,7 @@ while (it != pending.end() && count < 256) { printfd(__FILE__, "Disconnect user '%s'\n", it->login.c_str()); // Disconnect existing user + uit->params = it->params; Disconnect(*uit); users.erase(uit); } @@ -411,7 +413,7 @@ while (it != pending.end() && count < 256) ++it; ++count; } -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); pending.erase(pending.begin(), it); } //-----------------------------------------------------------------------------