notifiers(),
addUserNotifier(*this),
delUserNotifier(*this),
- addDelTariffNotifier(*this)
+ addDelTariffNotifier(*this),
+ logger(GetPluginLogger(GetStgLogger(), "smux"))
{
pthread_mutex_init(&mutex, NULL);
if (pthread_create(&thread, NULL, Runner, this))
{
errorStr = "Cannot create thread.";
+ logger("Cannot create thread.");
printfd(__FILE__, "Cannot create thread\n");
return -1;
}
if (sock < 0)
{
errorStr = "Cannot create socket.";
+ logger("Cannot create a socket: %s", strerror(errno));
printfd(__FILE__, "Cannot create socket\n");
return true;
}
if (connect(sock, reinterpret_cast<struct sockaddr *>(&addr), sizeof(addr)))
{
errorStr = "Cannot connect.";
+ logger("Cannot connect the socket: %s", strerror(errno));
printfd(__FILE__, "Cannot connect. Message: '%s'\n", strerror(errno));
return true;
}
it->GetUserPtr()->GetProperty().tariffName.DelAfterNotifier(&(*it));
++it;
}
+notifiers.clear();
}