mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Identify localhost by IP range, not by hostname
This commit is contained in:
@@ -679,13 +679,13 @@ extern "C" RENDERDOC_API TargetControl *RENDERDOC_CC RENDERDOC_CreateTargetContr
|
||||
if(host != NULL && host[0] != '\0')
|
||||
s = host;
|
||||
|
||||
bool localhost = (s == "localhost");
|
||||
|
||||
Network::Socket *sock = Network::CreateClientSocket(s.c_str(), ident & 0xffff, 3000);
|
||||
|
||||
if(sock == NULL)
|
||||
return NULL;
|
||||
|
||||
bool localhost = Network::GetIPOctet(sock->GetRemoteIP(), 0) == 127;
|
||||
|
||||
TargetControl *remote = new TargetControl(sock, clientName, forceConnection != 0, localhost);
|
||||
|
||||
if(remote->Connected())
|
||||
|
||||
Reference in New Issue
Block a user