X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/03b3169e54fbe4d4cae99307810b1f52f85c8f5a..15cd196134f4cf57907ba7c60f1fcd468c0fc6d1:/projects/stargazer/traffcounter.cpp?ds=sidebyside diff --git a/projects/stargazer/traffcounter.cpp b/projects/stargazer/traffcounter.cpp index e834b81f..72c1295b 100644 --- a/projects/stargazer/traffcounter.cpp +++ b/projects/stargazer/traffcounter.cpp @@ -409,7 +409,7 @@ printfd(__FILE__, "AddUser: %s\n", user->GetLogin().c_str()); uint32_t uip = user->GetCurrIP(); pair pi; -STG_LOCKER(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex, __FILE__, __LINE__); // Find all packets with IP belongs to this user pi = ip2packets.equal_range(uip); @@ -446,7 +446,7 @@ void TRAFFCOUNTER::DelUser(uint32_t uip) printfd(__FILE__, "DelUser: %s \n", inet_ntostring(uip).c_str()); pair pi; -STG_LOCKER(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex, __FILE__, __LINE__); pi = ip2packets.equal_range(uip); while (pi.first != pi.second)