diff --git a/server/proxy/pf_config.c b/server/proxy/pf_config.c index 625dd21a9..dd8af9bef 100644 --- a/server/proxy/pf_config.c +++ b/server/proxy/pf_config.c @@ -69,7 +69,6 @@ static BOOL pf_config_get_uint32(wIniFile* ini, const char* section, const char* static BOOL pf_config_load_server(wIniFile* ini, proxyConfig* config) { config->Host = _strdup(CONFIG_GET_STR(ini, "Server", "Host")); - config->LocalOnly = CONFIG_GET_BOOL(ini, "Server", "LocalOnly"); if (!pf_config_get_uint16(ini, "Server", "Port", &config->Port)) return FALSE; diff --git a/server/proxy/pf_config.h b/server/proxy/pf_config.h index 105b44db9..b42f2f752 100644 --- a/server/proxy/pf_config.h +++ b/server/proxy/pf_config.h @@ -33,7 +33,6 @@ struct proxy_config /* server */ char* Host; UINT16 Port; - BOOL LocalOnly; /* target */ BOOL UseLoadBalanceInfo; diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index d5080b534..fdfe3b98c 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -397,9 +397,6 @@ static void pf_server_mainloop(freerdp_listener* listener) int pf_server_start(proxyConfig* config) { - char* localSockPath; - char localSockName[MAX_PATH]; - BOOL success; WSADATA wsaData; freerdp_listener* listener = freerdp_listener_new(); @@ -417,33 +414,11 @@ int pf_server_start(proxyConfig* config) return -1; } - /* Determine filepath for local socket */ - sprintf_s(localSockName, sizeof(localSockName), "proxy.%" PRIu16 "", config->Port); - localSockPath = GetKnownSubPath(KNOWN_PATH_TEMP, localSockName); - - if (!localSockPath) - { - freerdp_listener_free(listener); - WSACleanup(); - return -1; - } - - /* Listen to local connections */ - success = listener->OpenLocal(listener, localSockPath); - - /* Listen to remote connections */ - if (!config->LocalOnly) - { - success &= listener->Open(listener, config->Host, config->Port); - } - - if (success) + if (listener->Open(listener, config->Host, config->Port)) { pf_server_mainloop(listener); } - free(localSockPath); - freerdp_listener_free(listener); WSACleanup(); return 0; }