From bb134395915633484bf84bd3f153e4243d391ef6 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 10 Dec 2014 12:18:31 -0800 Subject: [PATCH] fix regression of PR #515 --- tools/rosgraph/src/rosgraph/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/rosgraph/src/rosgraph/network.py b/tools/rosgraph/src/rosgraph/network.py index f1878237d3..ff499914af 100644 --- a/tools/rosgraph/src/rosgraph/network.py +++ b/tools/rosgraph/src/rosgraph/network.py @@ -168,9 +168,9 @@ def is_local_address(hostname): """ try: if use_ipv6(): - reverse_ips = [host[4][0] for host in socket.getaddrinfo(socket.gethostname(), 0, 0, 0, socket.SOL_TCP)] + reverse_ips = [host[4][0] for host in socket.getaddrinfo(hostname, 0, 0, 0, socket.SOL_TCP)] else: - reverse_ips = [host[4][0] for host in socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET, 0, socket.SOL_TCP)] + reverse_ips = [host[4][0] for host in socket.getaddrinfo(hostname, 0, socket.AF_INET, 0, socket.SOL_TCP)] except socket.error: return False local_addresses = ['localhost'] + get_local_addresses()