Mercurial > hg > orthanc
changeset 6454:12265dd65c54 queues-timeout
release timeout cannot be zero
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Wed, 19 Nov 2025 13:36:05 +0100 |
| parents | 573f4394a846 |
| children | 32c3413ff6ee |
| files | OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp |
| diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Wed Nov 19 13:21:07 2025 +0100 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Wed Nov 19 13:36:05 2025 +0100 @@ -10736,7 +10736,8 @@ * @param origin The position from where the value is dequeued (back for LIFO, front for FIFO). * @param releaseTimeout Timeout in seconds. If the value is not acknowledged before this delay expires, * the value is automatically released and made available for further calls to - * OrthancPluginDequeueValue() or OrthancPluginReserveQueueValue() + * OrthancPluginDequeueValue() or OrthancPluginReserveQueueValue(). + * This value cannot be equal to 0 second. * @param valueId An opaque identifier for this value, to be subsequently provided to * OrthancPluginAcknowledgeQueueValue(). * @return 0 if success, other value if error.
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Wed Nov 19 13:21:07 2025 +0100 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp Wed Nov 19 13:36:05 2025 +0100 @@ -3586,7 +3586,8 @@ QueueOrigin origin, uint32_t releaseTimeout) { - if (queueId.empty()) + if (queueId.empty() || + releaseTimeout == 0) { throw OrthancException(ErrorCode_ParameterOutOfRange); }
