# HG changeset patch # User Sebastien Jodogne # Date 1681487034 -7200 # Node ID ed7257b61bd7e8e41ca79aa705b5d102623f61ad # Parent d00064ec4baf05a289f5f2cf97579744e02742fa# Parent acaea72a3e91fb7cb45e533de57bda40ec308bdf back to mainline diff -r d00064ec4baf -r ed7257b61bd7 CITATION.cff --- a/CITATION.cff Fri Apr 14 13:20:24 2023 +0200 +++ b/CITATION.cff Fri Apr 14 17:43:54 2023 +0200 @@ -10,5 +10,5 @@ doi: "10.1007/s10278-018-0082-y" license: "GPL-3.0-or-later" repository-code: "https://hg.orthanc-server.com/orthanc/" -version: 1.10.1 -date-released: 2022-03-23 +version: 1.12.0 +date-released: 2023-04-14 diff -r d00064ec4baf -r ed7257b61bd7 NEWS --- a/NEWS Fri Apr 14 13:20:24 2023 +0200 +++ b/NEWS Fri Apr 14 17:43:54 2023 +0200 @@ -1,6 +1,10 @@ Pending changes in the mainline =============================== + +Version 1.12.0 (2023-04-14) +=========================== + General ------- diff -r d00064ec4baf -r ed7257b61bd7 OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake diff -r d00064ec4baf -r ed7257b61bd7 OrthancFramework/SharedLibrary/DllMain.cpp --- a/OrthancFramework/SharedLibrary/DllMain.cpp Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancFramework/SharedLibrary/DllMain.cpp Fri Apr 14 17:43:54 2023 +0200 @@ -27,35 +27,55 @@ ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp ${OPENSSL_SOURCES_DIR}/crypto/dllmain.c - **/ +**/ #if defined(_WIN32) || defined(__CYGWIN__) -# ifdef __CYGWIN__ -# include -# endif + +#include + +#include + +#include -#include "e_os.h" -#include "crypto/cryptlib.h" - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +#if defined(__BORLANDC__) +extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/) +#elif defined(_WIN32_WCE) + extern "C" BOOL WINAPI DllMain(HANDLE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/) +#else + extern "C" BOOL WINAPI DllMain(HINSTANCE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/) +#endif { - switch (fdwReason) + switch(dwReason) { case DLL_PROCESS_ATTACH: + { //OPENSSL_cpuid_setup(); // TODO - Is this necessary? + boost::on_process_enter(); + boost::on_thread_enter(); break; - + } + case DLL_THREAD_ATTACH: + { + boost::on_thread_enter(); break; - + } + case DLL_THREAD_DETACH: + { OPENSSL_thread_stop(); + boost::on_thread_exit(); break; - + } + case DLL_PROCESS_DETACH: + { + boost::on_thread_exit(); + boost::on_process_exit(); break; + } } - + return TRUE; } diff -r d00064ec4baf -r ed7257b61bd7 OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp --- a/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancServer/Plugins/Samples/MultitenantDicom/Plugin.cpp Fri Apr 14 17:43:54 2023 +0200 @@ -120,10 +120,9 @@ return -1; } - Orthanc::FromDcmtkBridge::InitializeDictionary(false /* loadPrivateDictionary */); /* Disable "gethostbyaddr" (which results in memory leaks) and use raw IP addresses */ dcmDisableGethostbyaddr.set(OFTrue); - + OrthancPluginSetDescription(context, "Multitenant plugin for Orthanc."); OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback); diff -r d00064ec4baf -r ed7257b61bd7 OrthancServer/Resources/RunCppCheck.sh --- a/OrthancServer/Resources/RunCppCheck.sh Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancServer/Resources/RunCppCheck.sh Fri Apr 14 17:43:54 2023 +0200 @@ -13,10 +13,10 @@ knownArgument:../../OrthancFramework/UnitTestsSources/ImageTests.cpp knownConditionTrueFalse:../../OrthancServer/Plugins/Engine/OrthancPlugins.cpp nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:322 -stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1403 +stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1475 stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:165 stlFindInsert:../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.cpp:73 -stlFindInsert:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:372 +stlFindInsert:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:373 stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:377 stlFindInsert:../../OrthancServer/Sources/ServerJobs/MergeStudyJob.cpp:40 stlFindInsert:../../OrthancServer/Sources/ServerJobs/SplitStudyJob.cpp:190 @@ -33,10 +33,10 @@ useInitializationList:../../OrthancFramework/Sources/Images/PngWriter.cpp:98 useInitializationList:../../OrthancServer/Sources/ServerJobs/DicomModalityStoreJob.cpp:274 assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:276 -assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:1018 +assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:1025 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:289 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:388 -assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3490 +assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3526 assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:272 EOF diff -r d00064ec4baf -r ed7257b61bd7 OrthancServer/Sources/Database/StatelessDatabaseOperations.h --- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.h Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.h Fri Apr 14 17:43:54 2023 +0200 @@ -70,6 +70,16 @@ std::set labels_; public: + // TODO - Cleanup + ExpandedResource() : + level_(ResourceType_Instance), + isStable_(false), + expectedNumberOfInstances_(0), + fileSize_(0), + indexInSeries_(0) + { + } + void SetResource(ResourceType level, const std::string& id) { diff -r d00064ec4baf -r ed7257b61bd7 OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.cpp --- a/OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.cpp Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.cpp Fri Apr 14 17:43:54 2023 +0200 @@ -6,18 +6,17 @@ * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with this program. If not, see - * . + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . **/ @@ -607,4 +606,4 @@ parentResources_.insert(resource); } -} \ No newline at end of file +} diff -r d00064ec4baf -r ed7257b61bd7 OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.h --- a/OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.h Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.h Fri Apr 14 17:43:54 2023 +0200 @@ -6,18 +6,17 @@ * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium * * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with this program. If not, see - * . + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . **/ diff -r d00064ec4baf -r ed7257b61bd7 OrthancServer/Sources/ServerToolbox.cpp --- a/OrthancServer/Sources/ServerToolbox.cpp Fri Apr 14 13:20:24 2023 +0200 +++ b/OrthancServer/Sources/ServerToolbox.cpp Fri Apr 14 17:43:54 2023 +0200 @@ -274,10 +274,6 @@ if (reconstructFiles) { - // preserve metadata from old resource - typedef std::map InstanceMetadata; - InstanceMetadata instanceMetadata; - std::string resultPublicId; // ignored std::unique_ptr dicomInstancetoStore(DicomInstanceToStore::CreateFromParsedDicomFile(locker.GetDicom()));