diff Sources/ReceivedInstanceCallback.cpp @ 171:c8de83fe7faa

removed deprecation warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Jun 2024 15:52:51 +0200
parents 6fada29b6759
children f8dc8dd2da76
line wrap: on
line diff
--- a/Sources/ReceivedInstanceCallback.cpp	Thu Jun 27 14:26:59 2024 +0200
+++ b/Sources/ReceivedInstanceCallback.cpp	Thu Jun 27 15:52:51 2024 +0200
@@ -53,12 +53,12 @@
     std::string traceback;
     if (lock.HasErrorOccurred(traceback))
     {
-      OrthancPlugins::LogError("Error in the Python received instance callback, traceback:\n" + traceback);
+      ORTHANC_PLUGINS_LOG_ERROR("Error in the Python received instance callback, traceback:\n" + traceback);
       return OrthancPluginReceivedInstanceAction_KeepAsIs;
     }
     else if (!PyTuple_Check(result.GetPyObject()) || PyTuple_Size(result.GetPyObject()) != 2)
     {
-      OrthancPlugins::LogError("The Python received instance callback has not returned a tuple as expected");
+      ORTHANC_PLUGINS_LOG_ERROR("The Python received instance callback has not returned a tuple as expected");
       return OrthancPluginReceivedInstanceAction_KeepAsIs;
     }
     else
@@ -68,7 +68,7 @@
 
       if (!PyLong_Check(returnCode))
       {
-        OrthancPlugins::LogError("The Python received instance callback has not returned an int as the first element of the return tuple");
+        ORTHANC_PLUGINS_LOG_ERROR("The Python received instance callback has not returned an int as the first element of the return tuple");
         return OrthancPluginReceivedInstanceAction_KeepAsIs;
       }
 
@@ -85,7 +85,7 @@
         Py_ssize_t pythonSize = 0;
         if (PyBytes_AsStringAndSize(modifiedDicom, &pythonBuffer, &pythonSize) == 1)
         {
-          OrthancPlugins::LogError("Cannot access the byte buffer returned by the Python received instance callback");
+          ORTHANC_PLUGINS_LOG_ERROR("Cannot access the byte buffer returned by the Python received instance callback");
           return OrthancPluginReceivedInstanceAction_KeepAsIs;
         }
         else
@@ -96,7 +96,7 @@
           {
             if (modifiedDicomBuffer->data == NULL)
             {
-              OrthancPlugins::LogError("Cannot allocate memory in the Python received instance callback");
+              ORTHANC_PLUGINS_LOG_ERROR("Cannot allocate memory in the Python received instance callback");
               return OrthancPluginReceivedInstanceAction_KeepAsIs;
             }
             else
@@ -112,8 +112,8 @@
   }
   catch (OrthancPlugins::PluginException& e)
   {
-    OrthancPlugins::LogError("Error in the Python received instance callback: " +
-                             std::string(e.What(OrthancPlugins::GetGlobalContext())));
+    ORTHANC_PLUGINS_LOG_ERROR("Error in the Python received instance callback: " +
+                              std::string(e.What(OrthancPlugins::GetGlobalContext())));
   }
 
   return OrthancPluginReceivedInstanceAction_KeepAsIs;