# HG changeset patch # User Sebastien Jodogne # Date 1426089091 -3600 # Node ID 272cb2019a4c556bc01bca2e505ca15d563cdbe7 # Parent b7351ecb79b460784e97214fe75ef019a507c50d fix recovery tool diff -r b7351ecb79b4 -r 272cb2019a4c Plugins/Engine/OrthancPlugins.cpp --- a/Plugins/Engine/OrthancPlugins.cpp Wed Feb 18 13:06:01 2015 +0100 +++ b/Plugins/Engine/OrthancPlugins.cpp Wed Mar 11 16:51:31 2015 +0100 @@ -304,11 +304,11 @@ bool OrthancPlugins::Handle(HttpOutput& output, - HttpMethod method, - const UriComponents& uri, - const Arguments& headers, - const Arguments& getArguments, - const std::string& postData) + HttpMethod method, + const UriComponents& uri, + const Arguments& headers, + const Arguments& getArguments, + const std::string& postData) { std::string flatUri = Toolbox::FlattenUri(uri); OrthancPluginRestCallback callback = NULL; @@ -321,11 +321,15 @@ for (PImpl::RestCallbacks::const_iterator it = pimpl_->restCallbacks_.begin(); it != pimpl_->restCallbacks_.end() && !found; ++it) { + printf(">> [%s]\n", flatUri.c_str()); + std::cout << " [" << *(it->first) << "]" << std::endl; + // Check whether the regular expression associated to this // callback matches the URI boost::cmatch what; if (boost::regex_match(flatUri.c_str(), what, *(it->first))) { + printf("ICI\n"); callback = it->second; // Extract the value of the free parameters of the regular expression diff -r b7351ecb79b4 -r 272cb2019a4c Resources/Samples/Tools/CMakeLists.txt --- a/Resources/Samples/Tools/CMakeLists.txt Wed Feb 18 13:06:01 2015 +0100 +++ b/Resources/Samples/Tools/CMakeLists.txt Wed Mar 11 16:51:31 2015 +0100 @@ -20,6 +20,9 @@ include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake) include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake) include(${ORTHANC_ROOT}/Resources/CMake/ZlibConfiguration.cmake) +include(${ORTHANC_ROOT}/Resources/CMake/GoogleLogConfiguration.cmake) + +include_directories(${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/Laaw) add_library(CommonLibraries ${BOOST_SOURCES} @@ -27,8 +30,8 @@ ${ORTHANC_ROOT}/Core/OrthancException.cpp ${ORTHANC_ROOT}/Core/Toolbox.cpp ${ORTHANC_ROOT}/Core/Uuid.cpp - ${ORTHANC_ROOT}/Resources/md5/md5.c - ${ORTHANC_ROOT}/Resources/base64/base64.cpp + ${ORTHANC_ROOT}/Resources/ThirdParty/md5/md5.c + ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp ) add_executable(RecoverCompressedFile @@ -37,4 +40,4 @@ ${ORTHANC_ROOT}/Core/Compression/ZlibCompressor.cpp ) -target_link_libraries(RecoverCompressedFile CommonLibraries) +target_link_libraries(RecoverCompressedFile CommonLibraries GoogleLog)