httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/win32 sockaddr.c
Date Wed, 08 Nov 2000 11:00:04 GMT
dreid       00/11/08 03:00:04

  Modified:    src/lib/apr/include apr_network_io.h
               src/lib/apr/network_io/beos sockaddr.c
               src/lib/apr/network_io/unix sockaddr.c
               src/lib/apr/network_io/win32 sockaddr.c
  Log:
  This adds the apr_port_t type to APR and should change all references in the
  APR code that use it.  Next up is the apache code and the test programs.
  
  Revision  Changes    Path
  1.62      +9 -5      apache-2.0/src/lib/apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- apr_network_io.h	2000/11/07 20:21:34	1.61
  +++ apr_network_io.h	2000/11/08 10:59:59	1.62
  @@ -126,8 +126,12 @@
   typedef struct apr_socket_t     apr_socket_t;
   typedef struct apr_pollfd_t     apr_pollfd_t;
   typedef struct apr_hdtr_t       apr_hdtr_t;
  -typedef struct in_addr      apr_in_addr;
  +typedef struct in_addr          apr_in_addr;
   
  +/* use apr_uint16_t just in case some system has a short that isn't 16 bits... */
  +typedef apr_uint16_t            apr_port_t;
  +
  +
   #if APR_HAS_SENDFILE
   /* Define flags passed in on apr_sendfile() */
   #define APR_SENDFILE_DISCONNECT_SOCKET      1
  @@ -385,7 +389,7 @@
    *      that this socket is going to use this port if possible.  If
    *      the port is already used, we won't find out about it here.
    */
  -apr_status_t apr_set_local_port(apr_socket_t *sock, apr_uint32_t port);
  +apr_status_t apr_set_local_port(apr_socket_t *sock, apr_port_t port);
   
   /**
    * Associate a remote port with a socket.
  @@ -394,21 +398,21 @@
    * @tip This does not make a connection to the remote port, it is just 
    *      telling apr which port apr_connect() should attempt to connect to.
    */
  -apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_uint32_t port);
  +apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_port_t port);
   
   /**
    * Return the local port with a socket.
    * @param port The local port this socket is associated with.
    * @param sock The socket to enquire about.
    */
  -apr_status_t apr_get_local_port(apr_uint32_t *port, apr_socket_t *sock);
  +apr_status_t apr_get_local_port(apr_port_t *port, apr_socket_t *sock);
   
   /**
    * Return the remote port associated with a socket.
    * @param port The remote port this socket is associated with.
    * @param sock The socket to enquire about.
    */
  -apr_status_t apr_get_remote_port(apr_uint32_t *port, apr_socket_t *sock);
  +apr_status_t apr_get_remote_port(apr_port_t *port, apr_socket_t *sock);
   
   /**
    * Associate a local socket addr with an apr socket.
  
  
  
  1.15      +6 -6      apache-2.0/src/lib/apr/network_io/beos/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockaddr.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- sockaddr.c	2000/08/02 05:26:26	1.14
  +++ sockaddr.c	2000/11/08 11:00:00	1.15
  @@ -58,25 +58,25 @@
   #else
   #include "networkio.h"
   
  -apr_status_t apr_set_local_port(apr_socket_t *sock, apr_uint32_t port)
  +apr_status_t apr_set_local_port(apr_socket_t *sock, apr_port_t port)
   {
       if (!sock) {
           return APR_EBADF;
       }
  -    sock->local_addr->sin_port = htons((short)port);
  +    sock->local_addr->sin_port = htons(port);
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_uint32_t port)
  +apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_port_t port)
   {
       if (!sock) {
           return APR_EBADF;
       }
  -    sock->remote_addr->sin_port = htons((short)port);
  +    sock->remote_addr->sin_port = htons(port);
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_get_local_port(apr_uint32_t *port, apr_socket_t *sock)
  +apr_status_t apr_get_local_port(apr_port_t *port, apr_socket_t *sock)
   {
       if (!sock) {
           return APR_EBADF;
  @@ -85,7 +85,7 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_get_remote_port(apr_uint32_t *port, apr_socket_t *sock)
  +apr_status_t apr_get_remote_port(apr_port_t *port, apr_socket_t *sock)
   {
       if (!sock) {
           return APR_EBADF;
  
  
  
  1.17      +6 -6      apache-2.0/src/lib/apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- sockaddr.c	2000/09/22 11:37:07	1.16
  +++ sockaddr.c	2000/11/08 11:00:02	1.17
  @@ -55,17 +55,17 @@
   #include "networkio.h"
   #include "apr_strings.h"
   
  -apr_status_t apr_set_local_port(apr_socket_t *sock, apr_uint32_t port)
  +apr_status_t apr_set_local_port(apr_socket_t *sock, apr_port_t port)
   {
  -    sock->local_addr->sin_port = htons((short)port);
  +    sock->local_addr->sin_port = htons(port);
       return APR_SUCCESS;
   }
   
   
   
  -apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_uint32_t port)
  +apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_port_t port)
   {
  -    sock->remote_addr->sin_port = htons((short)port);
  +    sock->remote_addr->sin_port = htons(port);
       return APR_SUCCESS;
   }
   
  @@ -87,7 +87,7 @@
   
   
   
  -apr_status_t apr_get_local_port(apr_uint32_t *port, apr_socket_t *sock)
  +apr_status_t apr_get_local_port(apr_port_t *port, apr_socket_t *sock)
   {
       if (sock->local_port_unknown) {
           apr_status_t rv = get_local_addr(sock);
  @@ -103,7 +103,7 @@
   
   
   
  -apr_status_t apr_get_remote_port(apr_uint32_t *port, apr_socket_t *sock)
  +apr_status_t apr_get_remote_port(apr_port_t *port, apr_socket_t *sock)
   {
       *port = ntohs(sock->remote_addr->sin_port);
       return APR_SUCCESS;
  
  
  
  1.13      +6 -6      apache-2.0/src/lib/apr/network_io/win32/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sockaddr.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- sockaddr.c	2000/10/06 17:24:39	1.12
  +++ sockaddr.c	2000/11/08 11:00:04	1.13
  @@ -74,23 +74,23 @@
   
   
   
  -apr_status_t apr_set_local_port(apr_socket_t *sock, apr_uint32_t port)
  +apr_status_t apr_set_local_port(apr_socket_t *sock, apr_port_t port)
   {
  -    sock->local_addr->sin_port = htons((short)port);
  +    sock->local_addr->sin_port = htons(port);
       return APR_SUCCESS;
   }
   
   
   
  -apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_uint32_t port)
  +apr_status_t apr_set_remote_port(apr_socket_t *sock, apr_port_t port)
   {
  -    sock->remote_addr->sin_port = htons((short)port);
  +    sock->remote_addr->sin_port = htons(port);
       return APR_SUCCESS;
   }
   
   
   
  -apr_status_t apr_get_local_port(apr_uint32_t *port, apr_socket_t *sock)
  +apr_status_t apr_get_local_port(apr_port_t *port, apr_socket_t *sock)
   {
       if (sock->local_port_unknown) {
           apr_status_t rv = get_local_addr(sock);
  @@ -106,7 +106,7 @@
   
   
   
  -apr_status_t apr_get_remote_port(apr_uint32_t *port, apr_socket_t *sock)
  +apr_status_t apr_get_remote_port(apr_port_t *port, apr_socket_t *sock)
   {
       *port = ntohs(sock->remote_addr->sin_port);
       return APR_SUCCESS;
  
  
  

Mime
View raw message