[med-svn] [Git][med-team/orthanc][master] 2 commits: Fix FTBFS with DCMTK 3.6.4. Closes: #919193
Sebastien Jodogne
gitlab at salsa.debian.org
Mon Jan 14 10:07:22 GMT 2019
Sebastien Jodogne pushed to branch master at Debian Med / orthanc
Commits:
c5781169 by jodogne-guest at 2019-01-14T09:31:02Z
Fix FTBFS with DCMTK 3.6.4. Closes: #919193
- - - - -
5177ca7d by jodogne-guest at 2019-01-14T09:45:48Z
Upload to unstable
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/dcmtk-3.6.4
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+orthanc (1.5.1+dfsg-2) unstable; urgency=medium
+
+ * Fix FTBFS with DCMTK 3.6.4. Closes: #919193
+
+ -- Sebastien Jodogne <s.jodogne at gmail.com> Mon, 14 Jan 2019 10:13:39 +0100
+
orthanc (1.5.1+dfsg-1) unstable; urgency=medium
* New upstream version
=====================================
debian/patches/dcmtk-3.6.4
=====================================
@@ -0,0 +1,195 @@
+Description: Fix compatibility with DCMTK 3.6.4
+Author: Sebastien Jodogne <s.jodogne at gmail.com>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: Orthanc-1.5.1/Core/DicomNetworking/Internals/CommandDispatcher.cpp
+===================================================================
+--- Orthanc-1.5.1.orig/Core/DicomNetworking/Internals/CommandDispatcher.cpp
++++ Orthanc-1.5.1/Core/DicomNetworking/Internals/CommandDispatcher.cpp
+@@ -83,6 +83,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "../../PrecompiledHeaders.h"
+ #include "CommandDispatcher.h"
+
++#if !defined(DCMTK_VERSION_NUMBER)
++# error The macro DCMTK_VERSION_NUMBER must be defined
++#endif
++
+ #include "FindScp.h"
+ #include "StoreScp.h"
+ #include "MoveScp.h"
+@@ -364,7 +368,11 @@ namespace Orthanc
+ UID_RETIRED_UltrasoundImageStorage,
+ UID_RETIRED_UltrasoundMultiframeImageStorage,
+ UID_RETIRED_VLImageStorage,
++#if DCMTK_VERSION_NUMBER >= 364
++ UID_RETIRED_VLMultiframeImageStorage,
++#else
+ UID_RETIRED_VLMultiFrameImageStorage,
++#endif
+ UID_RETIRED_XRayAngiographicBiPlaneImageStorage,
+ // draft
+ UID_DRAFT_SRAudioStorage,
+@@ -469,8 +477,16 @@ namespace Orthanc
+ DIC_AE calledAet_C;
+ DIC_AE remoteIp_C;
+ DIC_AE calledIP_C;
+- if (ASC_getAPTitles(assoc->params, remoteAet_C, calledAet_C, NULL).bad() ||
+- ASC_getPresentationAddresses(assoc->params, remoteIp_C, calledIP_C).bad())
++
++ if (
++#if DCMTK_VERSION_NUMBER >= 364
++ ASC_getAPTitles(assoc->params, remoteAet_C, sizeof(remoteAet_C), calledAet_C, sizeof(calledAet_C), NULL, 0).bad() ||
++ ASC_getPresentationAddresses(assoc->params, remoteIp_C, sizeof(remoteIp_C), calledIP_C, sizeof(calledIP_C)).bad()
++#else
++ ASC_getAPTitles(assoc->params, remoteAet_C, calledAet_C, NULL).bad() ||
++ ASC_getPresentationAddresses(assoc->params, remoteIp_C, calledIP_C).bad()
++#endif
++ )
+ {
+ T_ASC_RejectParameters rej =
+ {
+@@ -606,7 +622,12 @@ namespace Orthanc
+ ASC_setAPTitles(assoc->params, NULL, NULL, server.GetApplicationEntityTitle().c_str());
+
+ /* acknowledge or reject this association */
++#if DCMTK_VERSION_NUMBER >= 364
++ cond = ASC_getApplicationContextName(assoc->params, buf, sizeof(buf));
++#else
+ cond = ASC_getApplicationContextName(assoc->params, buf);
++#endif
++
+ if ((cond.bad()) || strcmp(buf, UID_StandardApplicationContext) != 0)
+ {
+ /* reject: the application context name is not supported */
+Index: Orthanc-1.5.1/Core/DicomNetworking/DicomUserConnection.cpp
+===================================================================
+--- Orthanc-1.5.1.orig/Core/DicomNetworking/DicomUserConnection.cpp
++++ Orthanc-1.5.1/Core/DicomNetworking/DicomUserConnection.cpp
+@@ -82,6 +82,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "../PrecompiledHeaders.h"
+ #include "DicomUserConnection.h"
+
++#if !defined(DCMTK_VERSION_NUMBER)
++# error The macro DCMTK_VERSION_NUMBER must be defined
++#endif
++
+ #include "../DicomFormat/DicomArray.h"
+ #include "../Logging.h"
+ #include "../OrthancException.h"
+@@ -330,7 +334,12 @@ namespace Orthanc
+ // Figure out which SOP class and SOP instance is encapsulated in the file
+ DIC_UI sopClass;
+ DIC_UI sopInstance;
++
++#if DCMTK_VERSION_NUMBER >= 364
++ if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(), sopClass, sizeof(sopClass), sopInstance, sizeof(sopInstance)))
++#else
+ if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(), sopClass, sopInstance))
++#endif
+ {
+ throw OrthancException(ErrorCode_NoSopClassOrInstance);
+ }
+@@ -572,7 +581,15 @@ namespace Orthanc
+
+ T_DIMSE_C_FindRSP response;
+ DcmDataset* statusDetail = NULL;
++
++#if DCMTK_VERSION_NUMBER >= 364
++ int responseCount;
++#endif
++
+ OFCondition cond = DIMSE_findUser(association, presID, &request, dataset,
++#if DCMTK_VERSION_NUMBER >= 364
++ responseCount,
++#endif
+ FindCallback, &payload,
+ /*opt_blockMode*/ DIMSE_BLOCKING,
+ /*opt_dimse_timeout*/ dimseTimeout,
+Index: Orthanc-1.5.1/Core/DicomNetworking/Internals/StoreScp.cpp
+===================================================================
+--- Orthanc-1.5.1.orig/Core/DicomNetworking/Internals/StoreScp.cpp
++++ Orthanc-1.5.1/Core/DicomNetworking/Internals/StoreScp.cpp
+@@ -83,6 +83,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ #include "../../PrecompiledHeaders.h"
+ #include "StoreScp.h"
+
++#if !defined(DCMTK_VERSION_NUMBER)
++# error The macro DCMTK_VERSION_NUMBER must be defined
++#endif
++
+ #include "../../DicomParsing/FromDcmtkBridge.h"
+ #include "../../DicomParsing/ToDcmtkBridge.h"
+ #include "../../OrthancException.h"
+@@ -188,10 +192,16 @@ namespace Orthanc
+ if (rsp->DimseStatus == STATUS_Success)
+ {
+ // which SOP class and SOP instance ?
++
++#if DCMTK_VERSION_NUMBER >= 364
++ if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sizeof(sopClass),
++ sopInstance, sizeof(sopInstance), /*opt_correctUIDPadding*/ OFFalse))
++#else
+ if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance, /*opt_correctUIDPadding*/ OFFalse))
++#endif
+ {
+- //LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName);
+- rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
++ //LOG4CPP_ERROR(Internals::GetLogger(), "bad DICOM file: " << fileName);
++ rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+ }
+ else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0)
+ {
+Index: Orthanc-1.5.1/Core/DicomParsing/FromDcmtkBridge.cpp
+===================================================================
+--- Orthanc-1.5.1.orig/Core/DicomParsing/FromDcmtkBridge.cpp
++++ Orthanc-1.5.1/Core/DicomParsing/FromDcmtkBridge.cpp
+@@ -41,6 +41,10 @@
+ # error The macro ORTHANC_SANDBOXED must be defined
+ #endif
+
++#if !defined(DCMTK_VERSION_NUMBER)
++# error The macro DCMTK_VERSION_NUMBER must be defined
++#endif
++
+ #include "FromDcmtkBridge.h"
+ #include "ToDcmtkBridge.h"
+ #include "../Logging.h"
+@@ -165,7 +169,11 @@ namespace Orthanc
+
+ ~DictionaryLocker()
+ {
++#if DCMTK_VERSION_NUMBER >= 364
++ dcmDataDict.wrunlock();
++#else
+ dcmDataDict.unlock();
++#endif
+ }
+
+ DcmDataDictionary& operator*()
+Index: Orthanc-1.5.1/Plugins/Engine/OrthancPlugins.cpp
+===================================================================
+--- Orthanc-1.5.1.orig/Plugins/Engine/OrthancPlugins.cpp
++++ Orthanc-1.5.1/Plugins/Engine/OrthancPlugins.cpp
+@@ -38,6 +38,10 @@
+ #error The plugin support is disabled
+ #endif
+
++#if !defined(DCMTK_VERSION_NUMBER)
++# error The macro DCMTK_VERSION_NUMBER must be defined
++#endif
++
+
+ #include "../../Core/ChunkedBuffer.h"
+ #include "../../Core/DicomFormat/DicomArray.h"
+@@ -2416,7 +2420,11 @@ namespace Orthanc
+
+ ~DictionaryReadLocker()
+ {
++#if DCMTK_VERSION_NUMBER >= 364
++ dcmDataDict.rdunlock();
++#else
+ dcmDataDict.unlock();
++#endif
+ }
+
+ const DcmDataDictionary* operator->()
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+dcmtk-3.6.4
View it on GitLab: https://salsa.debian.org/med-team/orthanc/compare/a75ccd766c2b7ee33742dd77b2f37a810656ba0b...5177ca7d5a9855f15e8bfeba2aee636a8e7d0c7a
--
View it on GitLab: https://salsa.debian.org/med-team/orthanc/compare/a75ccd766c2b7ee33742dd77b2f37a810656ba0b...5177ca7d5a9855f15e8bfeba2aee636a8e7d0c7a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190114/c0234d98/attachment-0001.html>
More information about the debian-med-commit
mailing list