#include <csignal>
#include <cassert>
+#include <cstdio> // Functions fopen and similar
#include "traffcounter.h"
#include "common.h"
uint32_t uip = user->GetCurrIP();
pair<ip2p_iter, ip2p_iter> 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);
printfd(__FILE__, "DelUser: %s \n", inet_ntostring(uip).c_str());
pair<ip2p_iter, ip2p_iter> pi;
-STG_LOCKER(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex, __FILE__, __LINE__);
pi = ip2packets.equal_range(uip);
while (pi.first != pi.second)
if (r != 3)
{
WriteServLog("Error in file %s. There must be 3 parameters. Line %d.", rulesFileName.c_str(), lineNumber);
+ fclose(f);
return true;
}
{
WriteServLog("Error in file %s. Line %d.",
rulesFileName.c_str(), lineNumber);
+ fclose(f);
return true;
}
{
WriteServLog("Error in file %s. Error in adress. Line %d.",
rulesFileName.c_str(), lineNumber);
+ fclose(f);
return true;
}
if (!test)