# HG changeset patch # User Sebastien Jodogne # Date 1347358782 -7200 # Node ID 601ee9b7f2c72dcd849fc0189b8d54523d43ca78 # Parent 42a449dac41570c253c361a349b724aef9945976 fixes diff -r 42a449dac415 -r 601ee9b7f2c7 PalanthirServer/main.cpp --- a/PalanthirServer/main.cpp Mon Sep 10 15:23:20 2012 +0200 +++ b/PalanthirServer/main.cpp Tue Sep 11 12:19:42 2012 +0200 @@ -113,7 +113,7 @@ { // DICOM server DicomServer dicomServer; - dicomServer.SetCalledApplicationEntityTitleCheck(true); + dicomServer.SetCalledApplicationEntityTitleCheck(GetGlobalBoolParameter("DicomCheckCalledAet", false)); dicomServer.SetStoreRequestHandlerFactory(storeScp); dicomServer.SetPortNumber(GetGlobalIntegerParameter("DicomPort", 4242)); dicomServer.SetApplicationEntityTitle(GetGlobalStringParameter("DicomAet", "PALANTHIR")); diff -r 42a449dac415 -r 601ee9b7f2c7 Resources/CMake/BoostConfiguration.cmake --- a/Resources/CMake/BoostConfiguration.cmake Mon Sep 10 15:23:20 2012 +0200 +++ b/Resources/CMake/BoostConfiguration.cmake Tue Sep 11 12:19:42 2012 +0200 @@ -2,7 +2,7 @@ SET(BOOST_STATIC 1) else() find_package(Boost - COMPONENTS filesystem thread system) + COMPONENTS filesystem thread system locale) if (${Boost_VERSION} LESS 104800) # boost::locale is only available from 1.48.00 diff -r 42a449dac415 -r 601ee9b7f2c7 Resources/Configuration.json --- a/Resources/Configuration.json Mon Sep 10 15:23:20 2012 +0200 +++ b/Resources/Configuration.json Tue Sep 11 12:19:42 2012 +0200 @@ -24,6 +24,9 @@ // The DICOM Application Entity Title "DicomAet" : "ANY-SCP", + // Check whether the called AET corresponds during a DICOM request + "DicomCheckCalledAet" : true, + // The DICOM port "DicomPort" : 4242, diff -r 42a449dac415 -r 601ee9b7f2c7 Resources/EmbedResources.py --- a/Resources/EmbedResources.py Mon Sep 10 15:23:20 2012 +0200 +++ b/Resources/EmbedResources.py Tue Sep 11 12:19:42 2012 +0200 @@ -142,6 +142,8 @@ ## Write the resource content in the .cpp source ##################################################################### +PYTHON_MAJOR_VERSION = sys.version_info[0] + def WriteResource(cpp, item): cpp.write(' static const uint8_t resource%dBuffer[] = {' % item['Index']) @@ -152,16 +154,21 @@ # http://stackoverflow.com/a/1035360 pos = 0 for b in content: + if PYTHON_MAJOR_VERSION == 2: + c = ord(b[0]) + else: + c = b + if pos > 0: cpp.write(', ') if (pos % 16) == 0: cpp.write('\n ') - if ord(b[0]) < 0: + if c < 0: raise Exception("Internal error") - cpp.write("0x%02x" % ord(b[0])) + cpp.write("0x%02x" % c) pos += 1 cpp.write(' };\n')