1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

PR feedback

This commit is contained in:
joshuakr
2021-04-09 15:33:01 -07:00
parent fc142b4f9c
commit eac23cead2
4 changed files with 41 additions and 6 deletions
+3 -2
View File
@@ -8,6 +8,7 @@
#include "TracyAlloc.hpp"
#include "TracySocket.hpp"
#include "TracySystem.hpp"
#ifdef _WIN32
# ifndef NOMINMAX
@@ -454,7 +455,7 @@ static int addrinfo_and_socket_for_family( uint16_t port, int ai_family, struct
hints.ai_family = ai_family;
hints.ai_socktype = SOCK_STREAM;
#ifndef TRACY_ONLY_LOCALHOST
const char* onlyLocalhost = getenv( "TRACY_ONLY_LOCALHOST" );
const char* onlyLocalhost = GetEnvVar( "TRACY_ONLY_LOCALHOST" );
if( !onlyLocalhost || onlyLocalhost[0] != '1' )
{
hints.ai_flags = AI_PASSIVE;
@@ -475,7 +476,7 @@ bool ListenSocket::Listen( uint16_t port, int backlog )
struct addrinfo* res = nullptr;
#if !defined TRACY_ONLY_IPV4 && !defined TRACY_ONLY_LOCALHOST
const char* onlyIPv4 = getenv( "TRACY_ONLY_IPV4" );
const char* onlyIPv4 = GetEnvVar( "TRACY_ONLY_IPV4" );
if( !onlyIPv4 || onlyIPv4[0] != '1' )
{
m_sock = addrinfo_and_socket_for_family( port, AF_INET6, &res );