rufuscoder / Shakespeer

A Direct Connect Client for Multiple Platforms
GNU General Public License v2.0
28 stars 14 forks source link

Cannot resolve hubs with a .local hostname #190

Open rufuscoder opened 11 years ago

rufuscoder commented 11 years ago

Original author: eoin.mcl...@gmail.com (December 21, 2008 12:27:36)

What steps will reproduce the problem?

  1. Attempt to connect to a hub with a .local hostname
  2. UI recieves status message 'Failed to lookup "whatever.local": request timed out'

What version of the product are you using? On what operating system? 0.9.10 PPC

Please provide any additional information below.

It seems io_lookup in io.c will correctly resolve .local addresses, but it seems this is not used, in favour of evdns_resolve_ipv4 which does not correctly resolve these .local addresses.

Original issue: http://code.google.com/p/shakespeer/issues/detail?id=98

rufuscoder commented 11 years ago

From hwa...@gmail.com on December 21, 2008 13:40:53 I wonder how we can change the code so that any hostname that is legal will work. A more general solution would be nice.

rufuscoder commented 11 years ago

From eoin.mcl...@gmail.com on December 21, 2008 15:27:17 I didn't intend the attached diff to be a correct solution, just what I used to get the behaviour I wanted -- poorly named and leaking hostent; I believe gethostbyname () is the OneTrueWay(tm) to resolve hostnames, so this is arguably a bug in libevent.

Aside from a non blocking lookup, I couldn't see why io_lookup was not used to resolve addresses.

rufuscoder commented 11 years ago

From markus.m...@gmail.com on February 05, 2009 09:37:41 Martin, you have any comments on this?