# HG changeset patch # User Sebastien Jodogne # Date 1599543787 -7200 # Node ID ee9b2e2c7e19d24dd54b967c2cd5010c149d5ed4 # Parent 3576616904d3945b253780da2ce5c4a89974167f# Parent 669f588a14b37504d18ac0d1be3acdd59e36d171 merge diff -r 3576616904d3 -r ee9b2e2c7e19 OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h --- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Mon Sep 07 15:08:52 2020 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Tue Sep 08 07:43:07 2020 +0200 @@ -1996,6 +1996,11 @@ * * This function registers a callback function that is called * whenever a new DICOM instance is stored into the Orthanc core. + * + * @warning If your callback has to call the REST API of Orthanc, + * you should make these calls in a separate thread (with the events + * passing through a message queue). Otherwise, this could result in + * deadlocks in the presence of other plugins or Lua scripts. * * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param callback The callback function. @@ -7597,12 +7602,18 @@ } _OrthancPluginIncomingDicomInstanceFilter; /** - * @brief Register a callback to filter incoming DICOM instance. + * @brief Register a callback to filter incoming DICOM instances. * * This function registers a custom callback to filter incoming * DICOM instances received by Orthanc (either through the REST API * or through the DICOM protocol). * + * @warning If your filter callback has to call the REST API of + * Orthanc, you should make these calls in a separate thread (with + * the events passing through a message queue). Otherwise, this + * could result in deadlocks in the presence of other plugins or Lua + * scripts. + * * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param callback The callback. * @return 0 if success, other value if error.