X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b9eabad70160eafdef8e691bbde0a711a95b1c20..9c340da9ffa670c20c3658a2be43d35868a9f5d9:/projects/rscriptd/listener.cpp diff --git a/projects/rscriptd/listener.cpp b/projects/rscriptd/listener.cpp index ead5d33b..222a02eb 100644 --- a/projects/rscriptd/listener.cpp +++ b/projects/rscriptd/listener.cpp @@ -16,7 +16,7 @@ /* * Author : Boris Mikhailenko - * Author : Maxim Mamontov + * Author : Maksym Mamontov */ #include @@ -49,10 +49,9 @@ LISTENER::LISTENER() receiverStopped(true), processorStopped(true), userTimeout(0), - listenSocket(0) + listenSocket(0), + version("rscriptd listener v.1.2") { -version = "rscriptd listener v.1.2"; - pthread_mutex_init(&mutex, NULL); } //----------------------------------------------------------------------------- @@ -312,7 +311,7 @@ else if (packetHead.packetType == RS_DISCONNECT_PACKET) } } -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); pending.push_back(data); return false; @@ -397,6 +396,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); } @@ -412,7 +412,7 @@ while (it != pending.end() && count < 256) ++it; ++count; } -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); pending.erase(pending.begin(), it); } //-----------------------------------------------------------------------------