Add resetSVRDB method to OCSecure to synchronize with OCPlatform
[platform/upstream/iotivity.git] / resource / provisioning / src / OCProvisioningManager.cpp
index 1ce0cca..1739998 100644 (file)
@@ -688,6 +688,24 @@ namespace OC
         return result;
     }
 
+    OCStackResult OCSecure::resetSVRDB()
+    {
+        OCStackResult result;
+        auto cLock = OCPlatform_impl::Instance().csdkLock().lock();
+
+        if (cLock)
+        {
+            std::lock_guard<std::recursive_mutex> lock(*cLock);
+            result = OCResetSVRDB();
+        }
+        else
+        {
+            oclog() << "Mutex not found";
+            result = OC_STACK_ERROR;
+        }
+        return result;
+    }
+
 #if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
     OCStackResult OCSecure::saveTrustCertChain(uint8_t *trustCertChain, size_t chainSize,
                                         OicEncodingType_t encodingType, uint16_t *credId)