apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/test client.c sendfile.c server.c testpoll.c testsockets.c testsockopt.c
Date Wed, 03 Sep 2003 14:43:53 GMT
trawick     2003/09/03 07:43:53

  Modified:    .        CHANGES
               include  apr_network_io.h
               network_io/os2 sockets.c
               network_io/unix sockets.c
               network_io/win32 sockets.c
               test     client.c sendfile.c server.c testpoll.c
                        testsockets.c testsockopt.c
  Log:
  remove these deprecated interfaces:
  
  apr_accept, apr_bind, apr_connect, apr_listen, apr_shutdown,
  apr_socket_create_ex, MAX_SECONDS_TO_LINGER
  
  Revision  Changes    Path
  1.427     +12 -0     apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.426
  retrieving revision 1.427
  diff -u -r1.426 -r1.427
  --- CHANGES	31 Aug 2003 16:28:54 -0000	1.426
  +++ CHANGES	3 Sep 2003 14:43:52 -0000	1.427
  @@ -1,3 +1,15 @@
  +Changes with APR 1.0
  +
  +  *) The following deprecated interfaces have been removed:
  +
  +     apr_accept                   -> apr_socket_accept
  +     apr_bind                     -> apr_socket_bind
  +     apr_connect                  -> apr_socket_connect
  +     apr_listen                   -> apr_socket_listen
  +     apr_shutdown                 -> apr_socket_shutdown
  +     apr_socket_create_ex         -> apr_socket_create
  +     MAX_SECONDS_TO_LINGER        -> APR_MAX_SECONDS_TO_LINGER
  +
   Changes with APR 0.9.4
   
     *) Work around a bug in Darwin when calling getnameinfo() on IPv4-mapped
  
  
  
  1.142     +2 -40     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.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- apr_network_io.h	30 May 2003 02:26:31 -0000	1.141
  +++ apr_network_io.h	3 Sep 2003 14:43:52 -0000	1.142
  @@ -84,11 +84,6 @@
   #define APR_MAX_SECS_TO_LINGER 30
   #endif
   
  -#ifndef MAX_SECS_TO_LINGER
  -/** @deprecated @see APR_MAX_SECS_TO_LINGER */
  -#define MAX_SECS_TO_LINGER APR_MAX_SECS_TO_LINGER
  -#endif
  -
   #ifndef APRMAXHOSTLEN
   /** Maximum hostname length */
   #define APRMAXHOSTLEN 256
  @@ -293,33 +288,18 @@
   
   /**
    * Create a socket.
  - * @remark With APR 1.0, this function follows the prototype 
  - * of apr_socket_create_ex.
    * @param new_sock The new socket that has been set up.
    * @param family The address family of the socket (e.g., APR_INET).
    * @param type The type of the socket (e.g., SOCK_STREAM).
  + * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).
    * @param cont The pool to use
    */
   APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new_sock, 
                                               int family, int type,
  +                                            int protocol,
                                               apr_pool_t *cont);
   
   /**
  - * Create a socket.
  - * @remark With APR 1.0, this function is deprecated and apr_socket_create 
  - * follows this prototype.
  - * @param new_sock The new socket that has been set up.
  - * @param family The address family of the socket (e.g., APR_INET).
  - * @param type The type of the socket (e.g., SOCK_STREAM).
  - * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).
  - * @param cont The pool to use
  - */
  -APR_DECLARE(apr_status_t) apr_socket_create_ex(apr_socket_t **new_sock, 
  -                                               int family, int type,
  -                                               int protocol,
  -                                               apr_pool_t *cont);
  -
  -/**
    * Shutdown either reading, writing, or both sides of a socket.
    * @param thesocket The socket to close 
    * @param how How to shutdown the socket.  One of:
  @@ -335,10 +315,6 @@
   APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,
                                                 apr_shutdown_how_e how);
   
  -/** @deprecated @see apr_socket_shutdown */
  -APR_DECLARE(apr_status_t) apr_shutdown(apr_socket_t *thesocket,
  -                                       apr_shutdown_how_e how);
  -
   /**
    * Close a socket.
    * @param thesocket The socket to close 
  @@ -355,9 +331,6 @@
   APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock, 
                                             apr_sockaddr_t *sa);
   
  -/** @deprecated @see apr_socket_bind */
  -APR_DECLARE(apr_status_t) apr_bind(apr_socket_t *sock, apr_sockaddr_t *sa);
  -
   /**
    * Listen to a bound socket for connections.
    * @param sock The socket to listen on 
  @@ -368,9 +341,6 @@
   APR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock, 
                                               apr_int32_t backlog);
   
  -/** @deprecated @see apr_socket_listen */
  -APR_DECLARE(apr_status_t) apr_listen(apr_socket_t *sock, apr_int32_t backlog);
  -
   /**
    * Accept a new connection request
    * @param new_sock A copy of the socket that is connected to the socket that
  @@ -383,11 +353,6 @@
                                               apr_socket_t *sock,
                                               apr_pool_t *connection_pool);
   
  -/** @deprecated @see apr_socket_accept */
  -APR_DECLARE(apr_status_t) apr_accept(apr_socket_t **new_sock, 
  -                                     apr_socket_t *sock,
  -                                     apr_pool_t *connection_pool);
  -
   /**
    * Issue a connection request to a socket either on the same machine 
    * or a different one.
  @@ -398,9 +363,6 @@
    */
   APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
                                                apr_sockaddr_t *sa);
  -
  -/** @deprecated @see apr_socket_connect */
  -APR_DECLARE(apr_status_t) apr_connect(apr_socket_t *sock, apr_sockaddr_t *sa);
   
   /**
    * Create apr_sockaddr_t from hostname, address family, and port.
  
  
  
  1.65      +2 -39     apr/network_io/os2/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/os2/sockets.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- sockets.c	8 Jul 2003 12:53:10 -0000	1.64
  +++ sockets.c	3 Sep 2003 14:43:52 -0000	1.65
  @@ -111,8 +111,8 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_socket_create_ex(apr_socket_t **new, int family, int type,
  -                                               int protocol, apr_pool_t *cont)
  +APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family, int type,
  +                                            int protocol, apr_pool_t *cont)
   {
       int downgrade = (family == AF_UNSPEC);
   
  @@ -146,12 +146,6 @@
       return APR_SUCCESS;
   } 
   
  -APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family, int type,
  -                                            apr_pool_t *cont)
  -{
  -    return apr_socket_create_ex(new, family, type, 0, cont);
  -}
  -
   APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket, 
                                                 apr_shutdown_how_e how)
   {
  @@ -344,34 +338,3 @@
   
   APR_IMPLEMENT_INHERIT_UNSET(socket, inherit, cntxt, socket_cleanup)
   
  -/* deprecated */
  -APR_DECLARE(apr_status_t) apr_shutdown(apr_socket_t *thesocket, 
  -                                       apr_shutdown_how_e how)
  -{
  -    return apr_socket_shutdown(thesocket, how);
  -}
  -
  -/* deprecated */
  -APR_DECLARE(apr_status_t) apr_bind(apr_socket_t *sock, apr_sockaddr_t *sa)
  -{
  -    return apr_socket_bind(sock, sa);
  -}
  -
  -/* deprecated */
  -APR_DECLARE(apr_status_t) apr_listen(apr_socket_t *sock, apr_int32_t backlog)
  -{
  -    return apr_socket_listen(sock, backlog);
  -}
  -
  -/* deprecated */
  -APR_DECLARE(apr_status_t) apr_accept(apr_socket_t **new, apr_socket_t *sock,
  -                                     apr_pool_t *connection_context)
  -{
  -    return apr_socket_accept(new, sock, connection_context);
  -}
  -
  -/* deprecated */
  -APR_DECLARE(apr_status_t) apr_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
  -{
  -    return apr_socket_connect(sock, sa);
  -}
  
  
  
  1.111     +2 -39     apr/network_io/unix/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- sockets.c	8 Jul 2003 12:53:11 -0000	1.110
  +++ sockets.c	3 Sep 2003 14:43:52 -0000	1.111
  @@ -111,8 +111,8 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_socket_create_ex(apr_socket_t **new, int ofamily, int type,
  -                                  int protocol, apr_pool_t *cont)
  +apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type,
  +                               int protocol, apr_pool_t *cont)
   {
       int family = ofamily;
   
  @@ -147,12 +147,6 @@
       return APR_SUCCESS;
   } 
   
  -apr_status_t apr_socket_create(apr_socket_t **new, int family, int type,
  -                               apr_pool_t *cont)
  -{
  -    return apr_socket_create_ex(new, family, type, 0, cont);
  -}
  -
   apr_status_t apr_socket_shutdown(apr_socket_t *thesocket, 
                                    apr_shutdown_how_e how)
   {
  @@ -420,34 +414,3 @@
   APR_IMPLEMENT_INHERIT_SET(socket, inherit, cntxt, socket_cleanup)
   
   APR_IMPLEMENT_INHERIT_UNSET(socket, inherit, cntxt, socket_cleanup)
  -
  -/* deprecated */
  -apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how)
  -{
  -    return apr_socket_shutdown(thesocket, how);
  -}
  -
  -/* deprecated */
  -apr_status_t apr_bind(apr_socket_t *sock, apr_sockaddr_t *sa)
  -{
  -    return apr_socket_bind(sock, sa);
  -}
  -
  -/* deprecated */
  -apr_status_t apr_listen(apr_socket_t *sock, apr_int32_t backlog)
  -{
  -    return apr_socket_listen(sock, backlog);
  -}
  -
  -/* deprecated */
  -apr_status_t apr_accept(apr_socket_t **new, apr_socket_t *sock,
  -                        apr_pool_t *connection_context)
  -{
  -    return apr_socket_accept(new, sock, connection_context);
  -}
  -
  -/* deprecated */
  -apr_status_t apr_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
  -{
  -    return apr_socket_connect(sock, sa);
  -}
  
  
  
  1.97      +3 -39     apr/network_io/win32/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockets.c,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- sockets.c	8 Jul 2003 12:53:12 -0000	1.96
  +++ sockets.c	3 Sep 2003 14:43:52 -0000	1.97
  @@ -103,9 +103,9 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_socket_create_ex(apr_socket_t **new, int family,
  -                                               int type, int protocol, 
  -                                               apr_pool_t *cont)
  +APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family,
  +                                            int type, int protocol, 
  +                                            apr_pool_t *cont)
   {
       int downgrade = (family == AF_UNSPEC);
   
  @@ -180,12 +180,6 @@
       return APR_SUCCESS;
   } 
   
  -APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int family,
  -                                            int type, apr_pool_t *cont)
  -{
  -    return apr_socket_create_ex(new, family, type, 0, cont);
  -}
  -
   APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,
                                                 apr_shutdown_how_e how)
   {
  @@ -531,34 +525,4 @@
   {    
       apr_socket_inherit_unset(socket);    
   }
  -/* Deprecated */
  -APR_DECLARE(apr_status_t) apr_shutdown(apr_socket_t *thesocket,
  -                                       apr_shutdown_how_e how)
  -{
  -    return apr_socket_shutdown(thesocket, how);
  -}
  -
  -/* Deprecated */
  -APR_DECLARE(apr_status_t) apr_bind(apr_socket_t *sock, apr_sockaddr_t *sa)
  -{
  -    return apr_socket_bind(sock, sa);
  -}
   
  -/* Deprecated */
  -APR_DECLARE(apr_status_t) apr_listen(apr_socket_t *sock, apr_int32_t backlog)
  -{
  -    return apr_socket_listen(sock, backlog);
  -}
  -
  -/* Deprecated */
  -APR_DECLARE(apr_status_t) apr_accept(apr_socket_t **new, apr_socket_t *sock,
  -                                     apr_pool_t *p)
  -{
  -    return apr_socket_accept(new, sock, p);
  -}
  -
  -/* Deprecated */
  -APR_DECLARE(apr_status_t) apr_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
  -{
  -    return apr_socket_connect(sock, sa);
  -}
  
  
  
  1.39      +1 -1      apr/test/client.c
  
  Index: client.c
  ===================================================================
  RCS file: /home/cvs/apr/test/client.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- client.c	1 Jan 2003 00:01:56 -0000	1.38
  +++ client.c	3 Sep 2003 14:43:53 -0000	1.39
  @@ -110,7 +110,7 @@
       fprintf(stdout,"OK\n");
   
       fprintf(stdout, "\tClient:  Creating new socket.......");
  -    if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM,
  +    if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM, 0,
                             context) != APR_SUCCESS) {
           fprintf(stderr, "Couldn't create socket\n");
           exit(-1);
  
  
  
  1.26      +1 -1      apr/test/sendfile.c
  
  Index: sendfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/sendfile.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- sendfile.c	12 Apr 2003 11:23:54 -0000	1.25
  +++ sendfile.c	3 Sep 2003 14:43:53 -0000	1.26
  @@ -115,7 +115,7 @@
       }
   
       *sock = NULL;
  -    rv = apr_socket_create(sock, *family, SOCK_STREAM, *p);
  +    rv = apr_socket_create(sock, *family, SOCK_STREAM, 0, *p);
       if (rv != APR_SUCCESS) {
           fprintf(stderr, "apr_socket_create()->%d/%s\n",
                   rv,
  
  
  
  1.40      +1 -1      apr/test/server.c
  
  Index: server.c
  ===================================================================
  RCS file: /home/cvs/apr/test/server.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- server.c	1 Jan 2003 00:01:56 -0000	1.39
  +++ server.c	3 Sep 2003 14:43:53 -0000	1.40
  @@ -114,7 +114,7 @@
       }
   
       APR_TEST_SUCCESS(rv, "Creating new socket", 
  -        apr_socket_create_ex(&sock, family, SOCK_STREAM, APR_PROTO_TCP, context))
  +        apr_socket_create(&sock, family, SOCK_STREAM, APR_PROTO_TCP, context))
   
       APR_TEST_SUCCESS(rv, "Setting option APR_SO_NONBLOCK",
           apr_socket_opt_set(sock, APR_SO_NONBLOCK, 1))
  
  
  
  1.26      +1 -1      apr/test/testpoll.c
  
  Index: testpoll.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testpoll.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- testpoll.c	12 Apr 2003 11:25:01 -0000	1.25
  +++ testpoll.c	3 Sep 2003 14:43:53 -0000	1.26
  @@ -81,7 +81,7 @@
       rv = apr_sockaddr_info_get(sa, "127.0.0.1", APR_UNSPEC, port, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
   
  -    rv = apr_socket_create(sock, (*sa)->family, SOCK_DGRAM, p);
  +    rv = apr_socket_create(sock, (*sa)->family, SOCK_DGRAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
   
       rv =apr_socket_bind((*sock), (*sa));
  
  
  
  1.10      +8 -8      apr/test/testsockets.c
  
  Index: testsockets.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testsockets.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- testsockets.c	8 Jul 2003 12:53:12 -0000	1.9
  +++ testsockets.c	3 Sep 2003 14:43:53 -0000	1.10
  @@ -73,7 +73,7 @@
       apr_status_t rv;
       apr_socket_t *sock = NULL;
   
  -    rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, p);
  +    rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
       CuAssertPtrNotNull(tc, sock);
       apr_socket_close(sock);
  @@ -84,7 +84,7 @@
       apr_status_t rv;
       apr_socket_t *sock = NULL;
   
  -    rv = apr_socket_create(&sock, APR_INET, SOCK_DGRAM, p);
  +    rv = apr_socket_create(&sock, APR_INET, SOCK_DGRAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
       CuAssertPtrNotNull(tc, sock);
       apr_socket_close(sock);
  @@ -96,7 +96,7 @@
       apr_status_t rv;
       apr_socket_t *sock = NULL;
   
  -    rv = apr_socket_create(&sock, APR_INET6, SOCK_STREAM, p);
  +    rv = apr_socket_create(&sock, APR_INET6, SOCK_STREAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
       CuAssertPtrNotNull(tc, sock);
       apr_socket_close(sock);
  @@ -111,7 +111,7 @@
       apr_status_t rv;
       apr_socket_t *sock = NULL;
   
  -    rv = apr_socket_create(&sock, APR_INET6, SOCK_DGRAM, p);
  +    rv = apr_socket_create(&sock, APR_INET6, SOCK_DGRAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
       CuAssertPtrNotNull(tc, sock);
       apr_socket_close(sock);
  @@ -133,9 +133,9 @@
       apr_sockaddr_t *to;
       apr_size_t len = 30;
   
  -    rv = apr_socket_create(&sock, FAMILY, SOCK_DGRAM, p);
  +    rv = apr_socket_create(&sock, FAMILY, SOCK_DGRAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
  -    rv = apr_socket_create(&sock2, FAMILY, SOCK_DGRAM, p);
  +    rv = apr_socket_create(&sock2, FAMILY, SOCK_DGRAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
   
       rv = apr_sockaddr_info_get(&to, US, APR_UNSPEC, 7772, 0, p);
  @@ -175,9 +175,9 @@
       char *data;
       const char *key = "GENERICKEY";
   
  -    rv = apr_socket_create(&sock1, AF_INET, SOCK_STREAM, p);
  +    rv = apr_socket_create(&sock1, AF_INET, SOCK_STREAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
  -    rv = apr_socket_create(&sock2, AF_INET, SOCK_STREAM, p);
  +    rv = apr_socket_create(&sock2, AF_INET, SOCK_STREAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
   
       rv = apr_socket_data_set(sock1, "SOCK1", key, NULL);
  
  
  
  1.17      +1 -1      apr/test/testsockopt.c
  
  Index: testsockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testsockopt.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- testsockopt.c	1 Jan 2003 00:01:56 -0000	1.16
  +++ testsockopt.c	3 Sep 2003 14:43:53 -0000	1.17
  @@ -64,7 +64,7 @@
   {
       apr_status_t rv;
   
  -    rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, p);
  +    rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, 0, p);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
       CuAssertPtrNotNull(tc, sock);
   }
  
  
  

Mime
View raw message