You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2003/12/03 13:36:42 UTC
cvs commit: apr/network_io/unix sockaddr.c
trawick 2003/12/03 04:36:42
Modified: . CHANGES
include apr_network_io.h
network_io/unix sockaddr.c
Log:
remove apr_sockaddr_ip_set() API
remove comment in apr_socket_connect() documentation mentioning that
the sockaddr parameter can be NULL
Revision Changes Path
1.445 +1 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.444
retrieving revision 1.445
diff -u -r1.444 -r1.445
--- CHANGES 2 Dec 2003 14:24:24 -0000 1.444
+++ CHANGES 3 Dec 2003 12:36:42 -0000 1.445
@@ -76,6 +76,7 @@
apr_setsocketopt -> apr_socket_opt_set
apr_shutdown -> apr_socket_shutdown
apr_signal_get_description -> apr_signal_description_get
+ apr_sockaddr_ip_set -> apr_sockaddr_info_get
apr_socket_create_ex -> apr_socket_create
apr_socket_set_inherit -> apr_socket_inherit_set
apr_socket_unset_inherit -> apr_socket_inherit_unset
1.150 +1 -12 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.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- apr_network_io.h 30 Nov 2003 16:47:29 -0000 1.149
+++ apr_network_io.h 3 Dec 2003 12:36:42 -0000 1.150
@@ -371,9 +371,7 @@
* Issue a connection request to a socket either on the same machine
* or a different one.
* @param sock The socket we wish to use for our side of the connection
- * @param sa The address of the machine we wish to connect to. If NULL,
- * APR assumes that the sockaddr_in in the apr_socket is
- * completely filled out.
+ * @param sa The address of the machine we wish to connect to.
*/
APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
apr_sockaddr_t *sa);
@@ -694,15 +692,6 @@
*/
APR_DECLARE(apr_status_t) apr_sockaddr_port_get(apr_port_t *port,
apr_sockaddr_t *sockaddr);
-
-/**
- * Set the IP address in an APR socket address.
- * @param sockaddr The socket address to use
- * @param addr The IP address to attach to the socket.
- * 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);
/**
* Return the IP address (in numeric address string format) in
1.46 +0 -27 apr/network_io/unix/sockaddr.c
Index: sockaddr.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- sockaddr.c 29 Sep 2003 11:31:59 -0000 1.45
+++ sockaddr.c 3 Dec 2003 12:36:42 -0000 1.46
@@ -145,33 +145,6 @@
return APR_SUCCESS;
}
-/* XXX assumes IPv4... I don't think this function is needed anyway
- * since we have apr_sockaddr_info_get(), but we need to clean up Apache's
- * listen.c a bit more first.
- */
-APR_DECLARE(apr_status_t) apr_sockaddr_ip_set(apr_sockaddr_t *sockaddr,
- const char *addr)
-{
- apr_uint32_t ipaddr;
-
- if (!strcmp(addr, APR_ANYADDR)) {
- sockaddr->sa.sin.sin_addr.s_addr = htonl(INADDR_ANY);
- return APR_SUCCESS;
- }
-
- ipaddr = inet_addr(addr);
- if (ipaddr == (apr_uint32_t)-1) {
-#ifdef WIN32
- return WSAEADDRNOTAVAIL;
-#else
- return errno;
-#endif
- }
-
- sockaddr->sa.sin.sin_addr.s_addr = ipaddr;
- return APR_SUCCESS;
-}
-
APR_DECLARE(apr_status_t) apr_sockaddr_port_get(apr_port_t *port,
apr_sockaddr_t *sockaddr)
{