mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 09:30:44 +00:00
fixes bug 220020 "PR_EnumerateAddrInfo should not special case port 0" r=wtc
This commit is contained in:
parent
a856106611
commit
cc7d8e978f
@ -2139,8 +2139,10 @@ PR_IMPLEMENT(void *) PR_EnumerateAddrInfo(void *iterPtr,
|
||||
if (ai->ai_addrlen < sizeof(PRNetAddr))
|
||||
memset(((char*)result)+ai->ai_addrlen, 0, sizeof(PRNetAddr) - ai->ai_addrlen);
|
||||
|
||||
if (port != 0)
|
||||
result->inet.port = PR_htons(port);
|
||||
if (result->raw.family == PR_AF_INET)
|
||||
result->inet.port = htons(port);
|
||||
else
|
||||
result->ipv6.port = htons(port);
|
||||
}
|
||||
|
||||
return ai;
|
||||
|
Loading…
x
Reference in New Issue
Block a user