You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2006/11/28 22:31:35 UTC
svn commit: r480216 - /apr/apr/branches/0.9.x/network_io/os2/sockets.c
Author: wrowe
Date: Tue Nov 28 13:31:34 2006
New Revision: 480216
URL: http://svn.apache.org/viewvc?view=rev&rev=480216
Log:
Sync OS2 unknown local_port flags to unix src.
Reviewed by wrowe and jorton
Partial backport of 480212
Modified:
apr/apr/branches/0.9.x/network_io/os2/sockets.c
Modified: apr/apr/branches/0.9.x/network_io/os2/sockets.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/network_io/os2/sockets.c?view=diff&rev=480216&r1=480215&r2=480216
==============================================================================
--- apr/apr/branches/0.9.x/network_io/os2/sockets.c (original)
+++ apr/apr/branches/0.9.x/network_io/os2/sockets.c Tue Nov 28 13:31:34 2006
@@ -140,6 +140,10 @@
return APR_OS2_STATUS(sock_errno());
else {
sock->local_addr = sa;
+ /* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
+ if (sock->local_addr->sa.sin.sin_port == 0) { /* no need for ntohs() when comparing w/ 0 */
+ sock->local_port_unknown = 1; /* kernel got us an ephemeral port */
+ }
return APR_SUCCESS;
}
}