mirror of
https://github.com/wolfpld/tracy
synced 2025-04-28 20:23:51 +00:00
Broadcast to localhost if listening only on localhost.
This commit is contained in:
parent
6f83044cf6
commit
2049332211
@ -1358,7 +1358,12 @@ void Profiler::Worker()
|
||||
#ifndef TRACY_NO_BROADCAST
|
||||
m_broadcast = (UdpBroadcast*)tracy_malloc( sizeof( UdpBroadcast ) );
|
||||
new(m_broadcast) UdpBroadcast();
|
||||
if( !m_broadcast->Open( "255.255.255.255", broadcastPort ) )
|
||||
# ifdef TRACY_ONLY_LOCALHOST
|
||||
const char* addr = "127.255.255.255";
|
||||
# else
|
||||
const char* addr = "255.255.255.255";
|
||||
# endif
|
||||
if( !m_broadcast->Open( addr, broadcastPort ) )
|
||||
{
|
||||
m_broadcast->~UdpBroadcast();
|
||||
tracy_free( m_broadcast );
|
||||
|
@ -603,7 +603,7 @@ bool UdpBroadcast::Open( const char* addr, uint16_t port )
|
||||
if( !ptr ) return false;
|
||||
|
||||
m_sock = sock;
|
||||
m_addr = inet_addr( addr );
|
||||
inet_pton( AF_INET, addr, &m_addr );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user