int Service::checkBusyAndCred(SocketManager::ConnectionID connectionID)
{
std::lock_guard<std::mutex> ulock(m_isBusyMutex);
- if (isBusy)
+ if (m_isBusy)
{
Cred nowCreds;
int ret = getCredentials(connectionID, &nowCreds);
LogError("Error on get credentials");
return -1;
}
- if (credentials.smack == nowCreds.smack && credentials.cred.pid == nowCreds.cred.pid)
+ if (m_credentials.smack == nowCreds.smack && m_credentials.cred.pid == nowCreds.cred.pid)
{
LogDebug("Server is Busy and Credentials are matched");
return 1;
int Service::checkBusyAndSet(SocketManager::ConnectionID connectionID)
{
std::lock_guard<std::mutex> ulock(m_isBusyMutex);
- if (isBusy)
+ if (m_isBusy)
return 1;
else{
- isBusy = true;
+ m_isBusy = true;
int ret = setCredentials(connectionID);
if (-1 == ret)
{
void Service::unsetBusy()
{
std::lock_guard<std::mutex> ulock(m_isBusyMutex);
- isBusy = false;
+ m_isBusy = false;
LogDebug("Set not Busy");
}
int Service::setCredentials(SocketManager::ConnectionID connectionID)
{
- return getCredentials(connectionID, &credentials);
+ return getCredentials(connectionID, &m_credentials);
}
int Service::getCredentials(SocketManager::ConnectionID connectionID, Cred *creds)