apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/network_io/win32 sockaddr.c
Date Fri, 05 Apr 2002 22:15:05 GMT
trawick     02/04/05 14:15:05

  Modified:    network_io/unix sockaddr.c
               network_io/win32 sockaddr.c
  Log:
  make sure apr_sockaddr_t->port gets filled in after the kernel
  assigns an ephemeral port and the app calls apr_socket_addr_get()
  to get the local socket address
  
  Revision  Changes    Path
  1.29      +2 -0      apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- sockaddr.c	13 Mar 2002 20:39:25 -0000	1.28
  +++ sockaddr.c	5 Apr 2002 22:15:04 -0000	1.29
  @@ -64,6 +64,8 @@
       }
       else {
           sock->local_port_unknown = sock->local_interface_unknown = 0;
  +        /* XXX assumes sin_port and sin6_port at same offset */
  +        sock->local_addr->port = ntohs(sock->local_addr->sa.sin.sin_port);
           return APR_SUCCESS;
       }
   }
  
  
  
  1.27      +2 -0      apr/network_io/win32/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockaddr.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- sockaddr.c	13 Mar 2002 20:39:25 -0000	1.26
  +++ sockaddr.c	5 Apr 2002 22:15:05 -0000	1.27
  @@ -68,6 +68,8 @@
       }
       else {
           sock->local_port_unknown = sock->local_interface_unknown = 0;
  +        /* XXX assumes sin_port and sin6_port at same offset */
  +        sock->local_addr->port = ntohs(sock->local_addr->sa.sin.sin_port);
           return APR_SUCCESS;
       }
   }
  
  
  

Mime
View raw message