Fix name of member variables (#36)
author강용구/Security&Privacy팀(SR)/삼성전자 <ygace.kang@samsung.com>
Thu, 11 Jan 2024 02:53:14 +0000 (11:53 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 11 Jan 2024 02:53:14 +0000 (11:53 +0900)
srcs/server/service.cpp
srcs/server/service.h

index 5c2e15d8f4b892a089f6e6b0d47a7d6dc40c4643..321002523e4c1251cac0912b6b1eaa84f4f746c2 100644 (file)
@@ -353,7 +353,7 @@ void Service::processCancel(SocketManager::ConnectionID connectionID,
 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);
@@ -362,7 +362,7 @@ int Service::checkBusyAndCred(SocketManager::ConnectionID connectionID)
             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;
@@ -383,10 +383,10 @@ int Service::checkBusyAndCred(SocketManager::ConnectionID connectionID)
 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)
         {
@@ -401,13 +401,13 @@ int Service::checkBusyAndSet(SocketManager::ConnectionID connectionID)
 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)
index 4b5612ce50bb02888192cd0f761079059dda94e0..ec9765988102120c95bb8ddc783be73368b51456 100644 (file)
@@ -151,9 +151,9 @@ private:
      */
     int getCredentials(SocketManager::ConnectionID connectionID, Cred *creds);
 
-    bool isBusy = false;
+    bool m_isBusy = false;
     std::mutex m_isBusyMutex;
-    Cred credentials;
+    Cred m_credentials;
 };
 
 } // namespace WebAuthn