# HG changeset patch # User Sebastien Jodogne # Date 1734370527 -3600 # Node ID 433e89edb3a0c19d6bbaae534c7ba64c2cb0bc69 # Parent c4c0640577fb14cd8c3a337e89e524d440d9b526# Parent 892ee42584bb4f588f00d831c177dbe9898b8e39 merge diff -r 892ee42584bb -r 433e89edb3a0 OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp Mon Dec 16 18:09:11 2024 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp Mon Dec 16 18:35:27 2024 +0100 @@ -44,6 +44,16 @@ #endif +#if ORTHANC_ENABLE_PLUGINS == 1 +# if defined(__ORTHANC_FILE__) +// Prevents the system-wide DCMTK library from leaking the +// full path of this source file in "DCMTLS_ERROR()" +# undef __FILE__ +# define __FILE__ __ORTHANC_FILE__ +# endif +#endif + + namespace Orthanc { namespace Internals diff -r 892ee42584bb -r 433e89edb3a0 OrthancServer/Resources/PreventProtobufDirectoryLeaks.py --- a/OrthancServer/Resources/PreventProtobufDirectoryLeaks.py Mon Dec 16 18:09:11 2024 +0100 +++ b/OrthancServer/Resources/PreventProtobufDirectoryLeaks.py Mon Dec 16 18:35:27 2024 +0100 @@ -29,13 +29,21 @@ with open(sys.argv[1], 'r') as f: s = f.read() -s = s.replace('__FILE__', '__ORTHANC_FILE__') +if False: + # This was the version in Orthanc 1.12.4, doesn't seem to work anymore + s = s.replace('__FILE__', '__ORTHANC_FILE__') -s = """ + s = """ #if !defined(__ORTHANC_FILE__) # define __ORTHANC_FILE__ __FILE__ #endif """ + s +else: + # New version in Orthanc 1.12.5 + s = """ +#undef __FILE__ +#define __FILE__ __ORTHANC_FILE__ +""" + s with open(sys.argv[1], 'w') as f: f.write(s)