Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Engine/OrthancPlugins.cpp @ 4850:5ec96ada5a53 received-instance-callback
more logs
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 14 Dec 2021 22:51:43 +0100 |
parents | 02d77189d8ba |
children | 5c1805499dec |
comparison
equal
deleted
inserted
replaced
4849:4addabcab158 | 4850:5ec96ada5a53 |
---|---|
2321 if (modifiedDicomSize64 > 0 || *modifiedDicomBufferData != NULL) | 2321 if (modifiedDicomSize64 > 0 || *modifiedDicomBufferData != NULL) |
2322 { | 2322 { |
2323 free(modifiedDicomBufferData); | 2323 free(modifiedDicomBufferData); |
2324 throw OrthancException(ErrorCode_Plugin, "The ReceivedInstanceCallback plugin is returning a modified buffer while it has discarded the instance"); | 2324 throw OrthancException(ErrorCode_Plugin, "The ReceivedInstanceCallback plugin is returning a modified buffer while it has discarded the instance"); |
2325 } | 2325 } |
2326 | |
2327 CLOG(INFO, PLUGINS) << "A plugin has discarded the instance in its ReceivedInstanceCallback"; | |
2326 return false; | 2328 return false; |
2327 } | 2329 } |
2328 else if (callbackResult == OrthancPluginReceivedInstanceCallbackResult_KeepAsIs) | 2330 else if (callbackResult == OrthancPluginReceivedInstanceCallbackResult_KeepAsIs) |
2329 { | 2331 { |
2330 if (modifiedDicomSize64 > 0 || *modifiedDicomBufferData != NULL) | 2332 if (modifiedDicomSize64 > 0 || *modifiedDicomBufferData != NULL) |
2343 free(modifiedDicomBufferData); | 2345 free(modifiedDicomBufferData); |
2344 throw OrthancException(ErrorCode_Plugin, "The Plugin has returned a > 4GB which is too large for Orthanc running in 32bits"); | 2346 throw OrthancException(ErrorCode_Plugin, "The Plugin has returned a > 4GB which is too large for Orthanc running in 32bits"); |
2345 } | 2347 } |
2346 | 2348 |
2347 modifiedDicomBufferSize = static_cast<size_t>(modifiedDicomSize64); | 2349 modifiedDicomBufferSize = static_cast<size_t>(modifiedDicomSize64); |
2350 | |
2351 CLOG(INFO, PLUGINS) << "A plugin has modified the instance in its ReceivedInstanceCallback"; | |
2348 return true; | 2352 return true; |
2349 } | 2353 } |
2350 else | 2354 else |
2351 { | 2355 { |
2352 throw OrthancException(ErrorCode_Plugin, "The ReceivedInstanceCallback plugin is not returning a modified buffer while it has modified the instance"); | 2356 throw OrthancException(ErrorCode_Plugin, "The ReceivedInstanceCallback plugin is not returning a modified buffer while it has modified the instance"); |