changeset 103:d2259c4cd677

added origin in ReceivedInstanceCallback
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Feb 2022 09:28:19 +0100
parents ed994991a20b
children 87fdb1a108db
files Sources/ReceivedInstanceCallback.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Sources/ReceivedInstanceCallback.cpp	Wed Feb 23 08:37:31 2022 +0100
+++ b/Sources/ReceivedInstanceCallback.cpp	Wed Feb 23 09:28:19 2022 +0100
@@ -35,15 +35,17 @@
 static OrthancPluginReceivedInstanceAction ReceivedInstanceCallback(
   OrthancPluginMemoryBuffer64* modifiedDicomBuffer /* out */,
   const void* receivedDicomBuffer,
-  uint64_t receivedDicomBufferSize)
+  uint64_t receivedDicomBufferSize,
+  OrthancPluginInstanceOrigin origin)
 {
   try
   {
     PythonLock lock;
 
-    PythonObject args(lock, PyTuple_New(1));
-
+    PythonObject args(lock, PyTuple_New(2));
+    
     PyTuple_SetItem(args.GetPyObject(), 0, PyBytes_FromStringAndSize(reinterpret_cast<const char*>(receivedDicomBuffer), receivedDicomBufferSize));
+    PyTuple_SetItem(args.GetPyObject(), 1, PyLong_FromLong(origin));
 
     PythonObject result(lock, PyObject_CallObject(receivedInstanceCallback_, args.GetPyObject()));