Identify localhost by IP range, not by hostname

This commit is contained in:
baldurk
2016-08-03 11:38:57 +02:00
parent aa69c2d6d2
commit 23da6f1e4b
+2 -2
View File
@@ -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())