Remove unnecessary unique_lock from read operation
[platform/core/appfw/pkgmgr-info.git] / src / server / database / cert_get_db_handler.cc
index d6daecb..881b84c 100644 (file)
@@ -19,6 +19,8 @@
 #include <shared_mutex>
 #include <vector>
 
+#include "utils/logging.hh"
+
 #include "pkgmgrinfo_debug.h"
 #include "pkgmgrinfo_internal.h"
 
@@ -39,13 +41,13 @@ void CertGetDBHandler::SetPkgID(std::string pkgid) {
 }
 
 int CertGetDBHandler::Execute() {
-  std::shared_lock<std::shared_timed_mutex> s(lock_);
+  std::shared_lock<std::shared_mutex> s(lock_);
 
   SetOpType(pkgmgr_common::DBOperationType::OPERATION_TYPE_READ);
   SetDBType(pkgmgr_common::DBType::DB_TYPE_FILE_CERTDB);
 
   if (!Connect()) {
-    _LOGE("Failed to connect database");
+    LOG(ERROR) << "Failed to connect database";
     return PMINFO_R_ERROR;
   }