server: proxy: drop local unix socket listen option
This commit is contained in:
parent
8a75e8f54e
commit
0b340b784c
@ -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;
|
||||
|
@ -33,7 +33,6 @@ struct proxy_config
|
||||
/* server */
|
||||
char* Host;
|
||||
UINT16 Port;
|
||||
BOOL LocalOnly;
|
||||
|
||||
/* target */
|
||||
BOOL UseLoadBalanceInfo;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user