Skip to content

Commit

Permalink
refs #10371. Windows NetworkProxy implementation done.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Oct 17, 2014
1 parent 71a1096 commit bbe4d1d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Kernel/CMakeLists.txt
Expand Up @@ -353,6 +353,7 @@ if ( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET( NETWORK_LIBRARIES "-framework SystemConfiguration" "-framework CoreFoundation" "-framework CoreServices")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
LIST( APPEND SRC_FILES src/NetworkProxyWin.cpp )
SET( NETWORK_LIBRARIES Winhttp )
else()
LIST( APPEND SRC_FILES src/NetworkProxyLinux.cpp )
endif()
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/Kernel/src/NetworkProxyWin.cpp
Expand Up @@ -2,6 +2,7 @@
#if defined(_WIN32) || defined(_WIN64)

#include "MantidKernel/NetworkProxy.h"
#include <Winhttp.h>

namespace Mantid
{
Expand Down Expand Up @@ -144,8 +145,8 @@ namespace Mantid

ProxyInfo proxyInfo; // No proxy
std::string errmsg, proxy_option;
g_log.debug() << "Attempt to get the proxy configuration for this connection" << std::endl;
if(get_proxy_configuration_win(remote_url, proxy_option,errmsg))
m_logger.debug() << "Attempt to get the windows proxy configuration for this connection" << std::endl;
if(get_proxy_configuration_win(targetURLString, proxy_option,errmsg))
{
std::string proxyServer;
int proxyPort;
Expand All @@ -172,13 +173,12 @@ namespace Mantid
proxyServer = proxy_option;
proxyPort = 8080;
}
g_log.information() << "ScriptRepository proxy found. Host: " << PROXYSERVER << " Port: " << PROXYPORT << std::endl;
}
proxyInfo = ProxyInfo(proxyServer, proxyPort, true);
}
else
{
g_log.information() << "ScriptRepository failed to find the proxy information. It will attempt without proxy. "
m_logger.information() << "ScriptRepository failed to find the proxy information. It will attempt without proxy. "
<< errmsg << std::endl;
}

Expand Down
4 changes: 1 addition & 3 deletions Code/Mantid/Framework/ScriptRepository/CMakeLists.txt
Expand Up @@ -28,7 +28,5 @@ set ( LIBS ${MANTIDLIBS} )
include_directories(inc)

target_link_libraries(ScriptRepository ${LIBS})
if ( MSVC )
target_link_libraries(ScriptRepository Winhttp)
endif()

install (TARGETS ScriptRepository ${SYSTEM_PACKAGE_TARGET} DESTINATION ${PLUGINS_DIR} )

0 comments on commit bbe4d1d

Please sign in to comment.