apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r480216 - /apr/apr/branches/0.9.x/network_io/os2/sockets.c
Date Tue, 28 Nov 2006 21:31:35 GMT
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;
     }
 }



Mime
View raw message