mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-07 21:01:27 +00:00
Identify localhost by IP range, not by hostname
This commit is contained in:
1 parent
aa69c2d6d2
commit
23da6f1e4b
1 file changed
+2
-2
@@ -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