apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr/network_io/os2 sockets.c
Date Sun, 14 Apr 2002 08:04:18 GMT
bjh         02/04/14 01:04:18

  Modified:    network_io/os2 sockets.c
  Log:
  OS/2: Set up local_addr of accepted socket
  
  Revision  Changes    Path
  1.53      +9 -2      apr/network_io/os2/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/os2/sockets.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- sockets.c	1 Apr 2002 14:18:22 -0000	1.52
  +++ sockets.c	14 Apr 2002 08:04:17 -0000	1.53
  @@ -196,9 +196,16 @@
       if ((*new)->socketdes < 0) {
           return APR_OS2_STATUS(sock_errno());
       }
  -    /* XXX fix up any pointers which are no longer valid (or just call
  -     *     apr_sockaddr_vars_set() to do it */
  +
  +    *(*new)->local_addr = *sock->local_addr;
  +    (*new)->local_addr->pool = connection_context;
       (*new)->remote_addr->port = ntohs((*new)->remote_addr->sa.sin.sin_port);
  +
  +    /* fix up any pointers which are no longer valid */
  +    if (sock->local_addr->sa.sin.sin_family == AF_INET) {
  +        (*new)->local_addr->ipaddr_ptr = &(*new)->local_addr->sa.sin.sin_addr;
  +    }
  +
       apr_pool_cleanup_register((*new)->cntxt, (void *)(*new), 
                           socket_cleanup, apr_pool_cleanup_null);
       return APR_SUCCESS;
  
  
  

Mime
View raw message