]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/listener.cpp
Add a script to run cppcheck over all projects.
[stg.git] / projects / rscriptd / listener.cpp
index ead5d33bdcebde8771e78cd2377c5c4b69ac9f49..0b626afd1f936be27b20a200f9409797c6cb1c9b 100644 (file)
@@ -49,10 +49,9 @@ LISTENER::LISTENER()
       receiverStopped(true),
       processorStopped(true),
       userTimeout(0),
       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);
 }
 //-----------------------------------------------------------------------------
 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;
 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
             {
             printfd(__FILE__, "Disconnect user '%s'\n", it->login.c_str());
             // Disconnect existing user
+            uit->params = it->params;
             Disconnect(*uit);
             users.erase(uit);
             }
             Disconnect(*uit);
             users.erase(uit);
             }
@@ -412,7 +412,7 @@ while (it != pending.end() && count < 256)
     ++it;
     ++count;
     }
     ++it;
     ++count;
     }
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
 pending.erase(pending.begin(), it);
 }
 //-----------------------------------------------------------------------------
 pending.erase(pending.begin(), it);
 }
 //-----------------------------------------------------------------------------