# HG changeset patch # User Alain Mazy # Date 1727100182 -7200 # Node ID 8a8756b2dd0b574d9bb90423fdce4f4ae18d3b88 # Parent 25df40a274fd4198013dfcf13fdab9d3eabb007b cleanup diff -r 25df40a274fd -r 8a8756b2dd0b OrthancServer/Plugins/Engine/PluginsEnumerations.cpp --- a/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Plugins/Engine/PluginsEnumerations.cpp Mon Sep 23 16:03:02 2024 +0200 @@ -122,9 +122,6 @@ case ChangeType_UpdatedMetadata: return OrthancPluginChangeType_UpdatedMetadata; - case ChangeType_INTERNAL_All: - return _OrthancPluginChangeType_All; - default: throw OrthancException(ErrorCode_ParameterOutOfRange); } diff -r 25df40a274fd -r 8a8756b2dd0b OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h --- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Mon Sep 23 16:03:02 2024 +0200 @@ -774,7 +774,6 @@ OrthancPluginChangeType_JobSuccess = 17, /*!< A Job has completed successfully */ OrthancPluginChangeType_JobFailure = 18, /*!< A Job has failed */ - _OrthancPluginChangeType_All = 65535, /*!< All jobs (when used as a filter in GetChanges) */ _OrthancPluginChangeType_INTERNAL = 0x7fffffff } OrthancPluginChangeType; diff -r 25df40a274fd -r 8a8756b2dd0b OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp --- a/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp Mon Sep 23 16:03:02 2024 +0200 @@ -1276,7 +1276,6 @@ std::vector filters; bool hasSince = false; bool hasTo = false; - // bool hasFilterType = false; if (since > 0) { @@ -1290,7 +1289,6 @@ } if (filterType.size() != 0) { - // hasFilterType = true; filters.push_back("changeType IN ( " + JoinChanges(filterType) + " )"); } @@ -1327,10 +1325,7 @@ { s.BindInt64(paramCounter++, to); } - // if (hasFilterType) - // { - // s.BindInt(paramCounter++, filterType); - // } + s.BindInt(paramCounter++, limit + 1); // we take limit+1 because we use the +1 to know if "Done" must be set to true GetChangesInternal(target, done, s, limit, returnFirstResults); } diff -r 25df40a274fd -r 8a8756b2dd0b OrthancServer/Sources/OrthancRestApi/OrthancRestChanges.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestChanges.cpp Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestChanges.cpp Mon Sep 23 16:03:02 2024 +0200 @@ -89,7 +89,7 @@ ServerContext& context = OrthancRestApi::GetContext(call); int64_t since, to; - std::set filterType; // = ChangeType_INTERNAL_All; + std::set filterType; unsigned int limit; bool last; diff -r 25df40a274fd -r 8a8756b2dd0b OrthancServer/Sources/ServerEnumerations.h --- a/OrthancServer/Sources/ServerEnumerations.h Mon Sep 23 15:40:27 2024 +0200 +++ b/OrthancServer/Sources/ServerEnumerations.h Mon Sep 23 16:03:02 2024 +0200 @@ -200,9 +200,7 @@ // The changes below this point are not logged into the database ChangeType_Deleted = 4096, - ChangeType_NewChildInstance = 4097, - - ChangeType_INTERNAL_All = 65535 // used to filter changes + ChangeType_NewChildInstance = 4097 }; enum BuiltinDecoderTranscoderOrder