[asterisk-dev] [Code Review] Add getnameinfo() to ast_sockaddr_resolve()

Paul Belanger pabelanger at digium.com
Tue May 3 15:23:30 CDT 2011


On 11-05-03 04:17 PM, Simon Perreault wrote:
> Let's continue this by email if you don't mind...
>
> On 2011-05-03 15:57, Paul Belanger wrote:
>> Sure, at first pass getaddrinfo() would return success for SIP/1050.
>> But SIP/1050 is not a peer, so Asterisk assume it is a hostname.
>>
>> [Dec 20 23:45:29] DEBUG[2288] netsock2.c: Splitting '1050' gives...
>
> Stop right here. getaddrinfo("1050", ...) should fail. Are you sure it
> doesn't fail? And if it doesn't fail then it means it resolved to
> something, so why don't we just use that something and be happy?
>
Yes, I believe this is the actual issue, it resolves to 0.0.4.26:5060 
and look at line 1614 in the debug[1] log for an example.  But as far as 
I can tell, 1050 is _not_ a valid hostname on the OS.

[1] https://issues.asterisk.org/file_download.php?file_id=28015&type=bug
-- 
Paul Belanger
Digium, Inc. | Software Developer
twitter: pabelanger | IRC: pabelanger (Freenode)
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list