Mercurial > hg > orthanc
changeset 4760:b2417ac5055a openssl-3.x
integration mainline->openssl-3.x
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 21 Jul 2021 10:48:14 +0200 |
parents | 56ed4c11fc2a (current diff) cb18a1869e4e (diff) |
children | 61da49321754 |
files | NEWS OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake OrthancServer/OrthancExplorer/explorer.js OrthancServer/OrthancExplorer/query-retrieve.js OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp OrthancServer/Sources/ServerContext.cpp |
diffstat | 12 files changed, 95 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu Jul 08 14:58:18 2021 +0200 +++ b/NEWS Wed Jul 21 10:48:14 2021 +0200 @@ -15,11 +15,21 @@ * Upgraded dependencies for static builds (notably on Windows and LSB): - openssl 3.0.0-beta1 + +Version 1.9.6 (2021-07-21) +========================== + Orthanc Explorer ---------------- +* In lookup and query/retrieve, possibility to provide a specific study date * Clicking on "Send to remote modality" displays the job information to monitor progress +Maintenance +----------- + +* Fix orphaned attachments if bad revision number is provided + Version 1.9.5 (2021-07-08) ==========================
--- a/OrthancFramework/Resources/CMake/Compiler.cmake Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancFramework/Resources/CMake/Compiler.cmake Wed Jul 21 10:48:14 2021 +0200 @@ -42,14 +42,6 @@ # use by "ExternalProject" in CMake SET(CMAKE_LSB_CC $ENV{LSB_CC} CACHE STRING "") SET(CMAKE_LSB_CXX $ENV{LSB_CXX} CACHE STRING "") - - # Explicitly adding "-lstdc++ -lm" during linking for LSB had to be - # introduced on the BuildBot server for LSB Release builds between - # "OrthancMySQL-4.0" and "OrthancMySQL-4.1" and after - # "Orthanc-1.9.5", for unclear reasons. Without this option, many - # symbols are left undefined while linking. Similar to: - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14001 - link_libraries(stdc++ m) endif()
--- a/OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake Wed Jul 21 10:48:14 2021 +0200 @@ -134,6 +134,8 @@ set(ORTHANC_FRAMEWORK_MD5 "6d5ca4a73ac7d42445041ca79de1624d") elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.9.5") set(ORTHANC_FRAMEWORK_MD5 "10fc64de1254a095e5d3ed3931f0cfbb") + elseif (ORTHANC_FRAMEWORK_VERSION STREQUAL "1.9.6") + set(ORTHANC_FRAMEWORK_MD5 "4b5d05683d747c29b2860ad79d11e62e") # Below this point are development snapshots that were used to # release some plugin, before an official release of the Orthanc
--- a/OrthancFramework/Sources/Compression/ZipReader.cpp Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancFramework/Sources/Compression/ZipReader.cpp Wed Jul 21 10:48:14 2021 +0200 @@ -38,7 +38,7 @@ /** * I have not been able to correctly define "ssize_t" on all versions - * of Visual Studio. As a consequence, I prefered to switch "ssize_t" + * of Visual Studio. As a consequence, I preferred to switch "ssize_t" * to "SSIZE_T", that is properly defined on both MSVC 2008 and 2015. * I define the macro "SSIZE_T" as an alias to "ssize_t" on * POSIX-compliant platforms that wouldn't have "SSIZE_T" defined.
--- a/OrthancFramework/Sources/Compression/ZipWriter.cpp Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancFramework/Sources/Compression/ZipWriter.cpp Wed Jul 21 10:48:14 2021 +0200 @@ -452,7 +452,7 @@ } catch (OrthancException& e) // Don't throw exceptions in destructors { - LOG(ERROR) << "Catched exception in destructor: " << e.What(); + LOG(ERROR) << "Caught exception in destructor: " << e.What(); } }
--- a/OrthancServer/OrthancExplorer/explorer.html Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/OrthancExplorer/explorer.html Wed Jul 21 10:48:14 2021 +0200 @@ -87,6 +87,11 @@ </select> </div> + <div data-role="fieldcontain"> + <label for="lookup-study-date-specific"></label> + <input type="date" name="lookup-study-date-specific" id="lookup-study-date-specific" /> + </div> + <fieldset class="ui-grid-b"> <div class="ui-block-a"> <a href="#find-patients" data-role="button" data-theme="b" data-direction="reverse">All patients</a> @@ -494,7 +499,7 @@ <div data-role="fieldcontain"> <label for="qr-value">Value for this field:</label> - <input type="text" name="qr-value" id="qr-value" value="*" /> + <input type="text" name="qr-value" id="qr-value" value="" /> </div> <div data-role="fieldcontain"> @@ -503,6 +508,11 @@ </select> </div> + <div data-role="fieldcontain"> + <label for="qr-date-specific"></label> + <input type="date" name="qr-date-specific" id="qr-date-specific" /> + </div> + <div data-role="fieldcontain" id="qr-modalities"> <div data-role="fieldcontain"> <fieldset data-role="controlgroup" data-type="horizontal">
--- a/OrthancServer/OrthancExplorer/explorer.js Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/OrthancExplorer/explorer.js Wed Jul 21 10:48:14 2021 +0200 @@ -494,23 +494,39 @@ target.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days')); target.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months')); target.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); + target.append($('<option>').attr('value', 'specific').text('Specific date')); target.selectmenu('refresh'); $('#lookup-result').hide(); + $('#lookup-study-date-specific').hide(); +}); + + +$('#lookup-study-date').live('change', function() { + if ($(this).val() == 'specific') { + $('#lookup-study-date-specific').show(); + } else { + $('#lookup-study-date-specific').hide(); + } }); $('#lookup-submit').live('click', function() { - var lookup; + var lookup, studyDate; $('#lookup-result').hide(); + studyDate = $('#lookup-study-date').val(); + if (studyDate == 'specific') { + studyDate = IsoToDicomDate($('#lookup-study-date-specific').val()); + } + lookup = { 'Level' : 'Study', 'Expand' : true, 'Limit' : LIMIT_RESOURCES + 1, 'Query' : { - 'StudyDate' : $('#lookup-study-date').val() + 'StudyDate' : studyDate }, 'Full' : true }; @@ -529,6 +545,9 @@ else if (input.id == 'lookup-study-description') { lookup['Query']['StudyDescription'] = input.value; } + else if (input.id == 'lookup-study-date-specific') { + // Ignore + } else { console.error('Unknown lookup field: ' + input.id); }
--- a/OrthancServer/OrthancExplorer/query-retrieve.js Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/OrthancExplorer/query-retrieve.js Wed Jul 21 10:48:14 2021 +0200 @@ -19,6 +19,11 @@ **/ +function IsoToDicomDate(s) +{ + return s.substring(0, 4) + s.substring(5, 7) + s.substring(8, 10); +} + function GenerateDicomDate(days) { var today = new Date(); @@ -36,8 +41,7 @@ var timezoneOffset = today.getTimezoneOffset() * 60 * 1000; var localDate = new Date(utc.getTime() - timezoneOffset); - var s = localDate.toISOString(); - return s.substring(0, 4) + s.substring(5, 7) + s.substring(8, 10); + return IsoToDicomDate(localDate.toISOString()); } @@ -73,7 +77,19 @@ targetDate.append($('<option>').attr('value', GenerateDicomDate(-31) + '-').text('Last 31 days')); targetDate.append($('<option>').attr('value', GenerateDicomDate(-31 * 3) + '-').text('Last 3 months')); targetDate.append($('<option>').attr('value', GenerateDicomDate(-365) + '-').text('Last year')); + targetDate.append($('<option>').attr('value', 'specific').text('Specific date')); targetDate.selectmenu('refresh'); + + $('#qr-date-specific').hide(); +}); + + +$('#qr-date').live('change', function() { + if ($(this).val() == 'specific') { + $('#qr-date-specific').show(); + } else { + $('#qr-date-specific').hide(); + } }); @@ -108,7 +124,12 @@ $('#qr-submit').live('click', function() { - var query, server, modalities, field; + var query, server, modalities, field, studyDate; + + studyDate = $('#qr-date').val(); + if (studyDate == 'specific') { + studyDate = IsoToDicomDate($('#qr-date-specific').val()); + } query = { 'Level' : 'Study', @@ -118,7 +139,7 @@ 'PatientID' : '', 'PatientName' : '', 'PatientSex' : '', - 'StudyDate' : $('#qr-date').val(), + 'StudyDate' : studyDate, 'StudyDescription' : '' } };
--- a/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancCPlugin.h Wed Jul 21 10:48:14 2021 +0200 @@ -7501,9 +7501,9 @@ * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). * @param pathRegularExpression Regular expression for the URI. May contain groups. * @param getHandler The callback function to handle REST calls using the GET HTTP method. - * @param postHandler The callback function to handle REST calls using the GET POST method. - * @param deleteHandler The callback function to handle REST calls using the GET DELETE method. - * @param putHandler The callback function to handle REST calls using the GET PUT method. + * @param postHandler The callback function to handle REST calls using the POST HTTP method. + * @param deleteHandler The callback function to handle REST calls using the DELETE HTTP method. + * @param putHandler The callback function to handle REST calls using the PUT HTTP method. * @param addChunk The callback invoked when a new chunk is available for the request body of a POST or PUT call. * @param execute The callback invoked once the entire body of a POST or PUT call is read. * @param finalize The callback invoked to release the resources associated with a POST or PUT call.
--- a/OrthancServer/Resources/Configuration.json Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/Resources/Configuration.json Wed Jul 21 10:48:14 2021 +0200 @@ -680,7 +680,8 @@ "MediaArchiveSize" : 1, // Performance setting to specify how Orthanc accesses the storage - // area during C-FIND. Three modes are available: (1) "Always" + // area during find operations (C-FIND, /tools/find API route and + // QIDO-RS in dicom-web). Three modes are available: (1) "Always" // allows Orthanc to read the storage area as soon as it needs an // information that is not present in its database (slowest mode), // (2) "Never" prevents Orthanc from accessing the storage area, and @@ -797,7 +798,7 @@ // identifier is only useful in the case of multiple // readers/writers, in order to avoid collisions between multiple // Orthanc servers. If unset, this identifier is taken as a SHA-1 - // hash derived from the MAC adddresses of the network interfaces, + // hash derived from the MAC addresses of the network interfaces, // and from the AET and TCP ports used by Orthanc. Manually setting // this option is needed in Docker/Kubernetes environments. (new in // Orthanc 1.9.2)
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestArchive.cpp Wed Jul 21 10:48:14 2021 +0200 @@ -490,7 +490,7 @@ .SetRequestField("Synchronous", RestApiCallDocumentation::Type_Boolean, "If `true`, create the archive in synchronous mode, which means that the HTTP answer will directly " "contain the ZIP file. This is the default, easy behavior. However, if global configuration option " - "\"SynchronousZipStream\" is set to \"false\", asynchronous transfers should be prefered for " + "\"SynchronousZipStream\" is set to \"false\", asynchronous transfers should be preferred for " "large amount of data, as the creation of the temporary file might lead to network timeouts.", false) .SetRequestField("Asynchronous", RestApiCallDocumentation::Type_Boolean, "If `true`, create the archive in asynchronous mode, which means that a job is submitted to create "
--- a/OrthancServer/Sources/ServerContext.cpp Thu Jul 08 14:58:18 2021 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Wed Jul 21 10:48:14 2021 +0200 @@ -1162,16 +1162,25 @@ StorageAccessor accessor(area_, GetMetricsRegistry()); FileInfo attachment = accessor.Write(data, size, attachmentType, compression, storeMD5_); - StoreStatus status = index_.AddAttachment( - newRevision, attachment, resourceId, hasOldRevision, oldRevision, oldMD5); - if (status != StoreStatus_Success) + try { + StoreStatus status = index_.AddAttachment( + newRevision, attachment, resourceId, hasOldRevision, oldRevision, oldMD5); + if (status != StoreStatus_Success) + { + accessor.Remove(attachment); + return false; + } + else + { + return true; + } + } + catch (OrthancException&) + { + // Fixed in Orthanc 1.9.6 accessor.Remove(attachment); - return false; - } - else - { - return true; + throw; } }