diff OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp @ 4602:cfdd1f59ff6f db-changes

fix OrthancCDatabasePlugin.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 22 Mar 2021 19:25:27 +0100
parents 27c07dbf6b4f
children 2c702cfae274
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp	Fri Mar 19 10:52:22 2021 +0100
+++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV3.cpp	Mon Mar 22 19:25:27 2021 +0100
@@ -725,9 +725,20 @@
                                 ResourceType& type,
                                 const std::string& publicId) ORTHANC_OVERRIDE
     {
-      CheckSuccess(that_.backend_.lookupResource(transaction_, Plugins::Convert(type), publicId.c_str()));
+      uint8_t existing;
+      OrthancPluginResourceType t;
+      CheckSuccess(that_.backend_.lookupResource(transaction_, &existing, &id, &t, publicId.c_str()));
       CheckNoEvent();
-      return ReadSingleInt64Answer(id);      
+
+      if (existing == 0)
+      {
+        return false;
+      }
+      else
+      {
+        type = Plugins::Convert(t);
+        return true;
+      }
     }