pv.param = "PingDelay";
pvi = std::find(s.moduleParams.begin(), s.moduleParams.end(), pv);
-if (pvi == s.moduleParams.end())
+if (pvi == s.moduleParams.end() || pvi->value.empty())
{
errorStr = "Parameter \'PingDelay\' not found.";
printfd(__FILE__, "Parameter 'PingDelay' not found\n");
}
//-----------------------------------------------------------------------------
PING::PING()
- : errorStr(),
- pingSettings(),
- settings(),
- users(NULL),
- usersList(),
- thread(),
- mutex(),
+ : users(NULL),
nonstop(false),
isRunning(false),
- pinger(),
- ChgCurrIPNotifierList(),
- ChgIPNotifierList(),
onAddUserNotifier(*this),
onDelUserNotifier(*this),
logger(GetPluginLogger(GetStgLogger(), "ping"))
//-----------------------------------------------------------------------------
int PING::Stop()
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (!isRunning)
return 0;
{
std::list<USER_PTR>::iterator iter = ping->usersList.begin();
{
- STG_LOCKER lock(&ping->mutex, __FILE__, __LINE__);
+ STG_LOCKER lock(&ping->mutex);
while (iter != ping->usersList.end())
{
if ((*iter)->GetProperty().ips.ConstData().OnlyOneIP())
//-----------------------------------------------------------------------------
void PING::GetUsers()
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
USER_PTR u;
int h = users->OpenSearch();
//-----------------------------------------------------------------------------
void PING::AddUser(USER_PTR u)
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
SetUserNotifiers(u);
usersList.push_back(u);
//-----------------------------------------------------------------------------
void PING::DelUser(USER_PTR u)
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
UnSetUserNotifiers(u);