apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/network_io/win32 sockopt.c
Date Mon, 15 Jul 2002 07:38:35 GMT
wrowe       2002/07/15 00:38:35

  Modified:    include  apr_network_io.h
               network_io/os2 sockopt.c
               network_io/unix sockopt.c
               network_io/win32 sockopt.c
  Log:
    Deprecate apr_get/setsockopt for apr_socket_opt_get/set
  
  Revision  Changes    Path
  1.127     +22 -13    apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_network_io.h,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- apr_network_io.h	15 Jul 2002 06:05:23 -0000	1.126
  +++ apr_network_io.h	15 Jul 2002 07:38:35 -0000	1.127
  @@ -410,7 +410,7 @@
    * @param sock The currently open socket.
    */
   APR_DECLARE(apr_status_t) apr_socket_data_get(void **data, const char *key,
  -                                             apr_socket_t *sock);
  +                                              apr_socket_t *sock);
   
   /**
    * Set the data associated with the current socket.
  @@ -420,8 +420,8 @@
    * @param cleanup The cleanup to call when the socket is destroyed.
    */
   APR_DECLARE(apr_status_t) apr_socket_data_set(apr_socket_t *sock, void *data,
  -                                             const char *key,
  -                                             apr_status_t (*cleanup)(void*));
  +                                              const char *key,
  +                                              apr_status_t (*cleanup)(void*));
   
   /**
    * Send data over a network.
  @@ -545,9 +545,12 @@
    * </PRE>
    * @param on Value for the option.
    */
  +APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
  +                                             apr_int32_t opt, apr_int32_t on);
  +
  +/** @deprecated @see apr_socket_opt_set */
   APR_DECLARE(apr_status_t) apr_setsocketopt(apr_socket_t *sock,
  -                                           apr_int32_t opt, 
  -                                           apr_int32_t on);
  +                                           apr_int32_t opt, apr_int32_t on);
   
   /**
    * Setup socket timeout for the specified socket
  @@ -576,6 +579,10 @@
    * </PRE>
    * @param on Socket option returned on the call.
    */
  +APR_DECLARE(apr_status_t) apr_socket_opt_get(apr_socket_t *sock, 
  +                                             apr_int32_t opt, apr_int32_t *on);
  +
  +/** @deprecated @see apr_socket_opt_set */
   APR_DECLARE(apr_status_t) apr_getsocketopt(apr_socket_t *sock, 
                                              apr_int32_t opt, apr_int32_t *on);
   
  @@ -594,8 +601,8 @@
    * @param sock The socket to use
    */
   APR_DECLARE(apr_status_t) apr_socket_addr_get(apr_sockaddr_t **sa,
  -                                           apr_interface_e which,
  -                                           apr_socket_t *sock);
  +                                              apr_interface_e which,
  +                                              apr_socket_t *sock);
    
   /**
    * Set the port in an APR socket address.
  @@ -603,7 +610,7 @@
    * @param port The port to be stored in the socket address.
    */
   APR_DECLARE(apr_status_t) apr_sockaddr_port_set(apr_sockaddr_t *sockaddr,
  -                                       apr_port_t port);
  +                                                apr_port_t port);
   
   /**
    * Return the port in an APR socket address.
  @@ -611,7 +618,7 @@
    * @param sockaddr The socket address to reference.
    */
   APR_DECLARE(apr_status_t) apr_sockaddr_port_get(apr_port_t *port,
  -                                       apr_sockaddr_t *sockaddr);
  +                                                apr_sockaddr_t *sockaddr);
   
   /**
    * Set the IP address in an APR socket address.
  @@ -620,7 +627,7 @@
    *             Use APR_ANYADDR to use any IP addr on the machine.
    */
   APR_DECLARE(apr_status_t) apr_sockaddr_ip_set(apr_sockaddr_t *sockaddr,
  -                                         const char *addr);
  +                                              const char *addr);
   
   /**
    * Return the IP address (in numeric address string format) in
  @@ -629,7 +636,7 @@
    * @param sockaddr The socket address to reference.
    */
   APR_DECLARE(apr_status_t) apr_sockaddr_ip_get(char **addr, 
  -                                         apr_sockaddr_t *sockaddr);
  +                                              apr_sockaddr_t *sockaddr);
   
   /**
    * See if the IP addresses in two APR socket addresses are
  @@ -678,8 +685,10 @@
    * @param mask_or_numbits The input netmask or number-of-bits string, or NULL
    * @param p The pool to allocate from
    */
  -APR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, const char *ipstr,

  -                                              const char *mask_or_numbits, apr_pool_t *p);
  +APR_DECLARE(apr_status_t) apr_ipsubnet_create(apr_ipsubnet_t **ipsub, 
  +                                              const char *ipstr, 
  +                                              const char *mask_or_numbits, 
  +                                              apr_pool_t *p);
   
   /**
    * Test the IP address in an apr_sockaddr_t against a pre-built ip-subnet
  
  
  
  1.27      +22 -4     apr/network_io/os2/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/os2/sockopt.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- sockopt.c	15 Jul 2002 06:12:28 -0000	1.26
  +++ sockopt.c	15 Jul 2002 07:38:35 -0000	1.27
  @@ -67,14 +67,16 @@
   #include <sys/so_ioctl.h>
   
   
  -APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t
t)
  +APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, 
  +                                                 apr_interval_time_t t)
   {
       sock->timeout = t;
       return APR_SUCCESS;
   }
   
   
  -APR_DECLARE(apr_status_t) apr_setsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t
on)
  +APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock, 
  +                                             apr_int32_t opt, apr_int32_t on)
   {
       int one;
       struct linger li;
  @@ -131,14 +133,16 @@
   }
   
   
  -APR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t
*t)
  +APR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock, 
  +                                                 apr_interval_time_t *t)
   {
       *t = sock->timeout;
       return APR_SUCCESS;
   }
   
   
  -APR_DECLARE(apr_status_t) apr_getsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t
*on)
  +APR_DECLARE(apr_status_t) apr_socket_opt_get(apr_socket_t *sock, 
  +                                             apr_int32_t opt, apr_int32_t *on)
   {
       switch(opt) {
       case APR_SO_TIMEOUT:
  @@ -151,6 +155,20 @@
       return APR_SUCCESS;
   }
   
  +
  +/* deprecated */
  +APR_DECLARE(apr_status_t) apr_setsocketopt(apr_socket_t *sock,
  +                                           apr_int32_t opt, apr_int32_t on)
  +{
  +    return apr_socket_opt_set(sock, opt, on);
  +}
  +
  +APR_DECLARE(apr_status_t) apr_getsocketopt(apr_socket_t *sock,
  +                                           apr_int32_t opt, apr_int32_t *on)
  +{
  +    return apr_socket_opt_get(sock, opt, on)
  +}
  +                                           
   
   APR_DECLARE(apr_status_t) apr_gethostname(char *buf, apr_int32_t len, apr_pool_t *cont)
   {
  
  
  
  1.57      +21 -4     apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- sockopt.c	15 Jul 2002 07:29:28 -0000	1.56
  +++ sockopt.c	15 Jul 2002 07:38:35 -0000	1.57
  @@ -111,7 +111,7 @@
   }
   
   
  -APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t
t)
  +apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t)
   {
       apr_status_t stat;
   
  @@ -147,7 +147,8 @@
   }
   
   
  -apr_status_t apr_setsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t on)
  +apr_status_t apr_socket_opt_set(apr_socket_t *sock, 
  +                                apr_int32_t opt, apr_int32_t on)
   {
       int one;
       apr_status_t rv;
  @@ -323,14 +324,15 @@
   }         
   
   
  -APR_DECLARE(apr_status_t) apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t
*t)
  +apr_status_t apr_socket_timeout_get(apr_socket_t *sock, apr_interval_time_t *t)
   {
       *t = sock->timeout;
       return APR_SUCCESS;
   }
   
   
  -apr_status_t apr_getsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t *on)
  +apr_status_t apr_socket_opt_get(apr_socket_t *sock, 
  +                                apr_int32_t opt, apr_int32_t *on)
   {
       switch(opt) {
           case APR_SO_TIMEOUT:
  @@ -342,6 +344,21 @@
       }
       return APR_SUCCESS;
   }
  +
  +
  +/* deprecated */
  +apr_status_t apr_setsocketopt(apr_socket_t *sock,
  +                              apr_int32_t opt, apr_int32_t on)
  +{
  +    return apr_socket_opt_set(sock, opt, on);
  +}
  +
  +apr_status_t apr_getsocketopt(apr_socket_t *sock,
  +                              apr_int32_t opt, apr_int32_t *on)
  +{
  +    return apr_socket_opt_get(sock, opt, on)
  +}
  +                                           
   
   apr_status_t apr_gethostname(char *buf, apr_int32_t len, apr_pool_t *cont)
   {
  
  
  
  1.42      +18 -4     apr/network_io/win32/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockopt.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- sockopt.c	15 Jul 2002 07:26:12 -0000	1.41
  +++ sockopt.c	15 Jul 2002 07:38:35 -0000	1.42
  @@ -124,8 +124,8 @@
   }
   
   
  -APR_DECLARE(apr_status_t) apr_setsocketopt(apr_socket_t *sock,
  -                                           apr_int32_t opt, apr_int32_t on)
  +APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock,
  +                                             apr_int32_t opt, apr_int32_t on)
   {
       int one;
       apr_status_t stat;
  @@ -253,8 +253,8 @@
   }
   
   
  -APR_DECLARE(apr_status_t) apr_getsocketopt(apr_socket_t *sock,
  -                                           apr_int32_t opt, apr_int32_t *on)
  +APR_DECLARE(apr_status_t) apr_socket_opt_get(apr_socket_t *sock,
  +                                             apr_int32_t opt, apr_int32_t *on)
   {
       switch (opt) {
       case APR_SO_TIMEOUT: 
  @@ -275,6 +275,20 @@
       return APR_SUCCESS;
   }
   
  +
  +/* deprecated */
  +APR_DECLARE(apr_status_t) apr_setsocketopt(apr_socket_t *sock,
  +                                           apr_int32_t opt, apr_int32_t on)
  +{
  +    return apr_socket_opt_set(sock, opt, on);
  +}
  +
  +APR_DECLARE(apr_status_t) apr_getsocketopt(apr_socket_t *sock,
  +                                           apr_int32_t opt, apr_int32_t *on)
  +{
  +    return apr_socket_opt_get(sock, opt, on)
  +}
  +                                           
   
   APR_DECLARE(apr_status_t) apr_gethostname(char *buf, int len,
                                             apr_pool_t *cont)
  
  
  

Mime
View raw message