apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apr/network_io/win32 sockopt.c
Date Mon, 18 Dec 2000 17:00:44 GMT
trawick     00/12/18 09:00:44

  Modified:    .        CHANGES aprlib.def
               include  apr_network_io.h
               network_io/os2 sockopt.c
               network_io/unix sockopt.c
               network_io/win32 sockopt.c
  Log:
  Axe apr_get_hostname().  Use apr_getnameinfo() instead.
  
  Revision  Changes    Path
  1.26      +1 -1      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- CHANGES	2000/12/17 13:12:11	1.25
  +++ CHANGES	2000/12/18 17:00:39	1.26
  @@ -16,7 +16,7 @@
   
     *) Add apr_getnameinfo(), a replacement for apr_get_hostname() which
        supports IPv6 and will be friendlier for use with eventual 
  -     SOCK_DGRAM support.  [Jeff Trawick]
  +     SOCK_DGRAM support.  apr_get_hostname() is gone.  [Jeff Trawick]
   
   Changes with APR a9
   
  
  
  
  1.54      +0 -1      apr/aprlib.def
  
  Index: aprlib.def
  ===================================================================
  RCS file: /home/cvs/apr/aprlib.def,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- aprlib.def	2000/12/15 20:56:51	1.53
  +++ aprlib.def	2000/12/18 17:00:39	1.54
  @@ -62,7 +62,6 @@
   	apr_listen
   	apr_accept
   	apr_connect
  -	apr_get_hostname
   	apr_gethostname
   	apr_send
   	apr_recv
  
  
  
  1.91      +0 -9      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.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- apr_network_io.h	2000/12/15 20:56:54	1.90
  +++ apr_network_io.h	2000/12/18 17:00:41	1.91
  @@ -280,15 +280,6 @@
   apr_status_t apr_connect(apr_socket_t *sock, apr_sockaddr_t *sa);
   
   /**
  - * Get name of a machine we are currently connected to.
  - * @param name A buffer to store the hostname in.
  - * @param which Which interface do we wnt the hostname for?
  - * @param sock The socket to examine.
  - */
  -apr_status_t apr_get_hostname(char **name, apr_interface_e which,
  -                              apr_socket_t *sock);
  -
  -/**
    * Create apr_sockaddr_t from hostname, address family, and port.
    * @param sa The new apr_sockaddr_t.
    * @param hostname The hostname or numeric address string to resolve/parse.
  
  
  
  1.20      +0 -27     apr/network_io/os2/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/os2/sockopt.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- sockopt.c	2000/11/16 02:17:29	1.19
  +++ sockopt.c	2000/12/18 17:00:42	1.20
  @@ -146,30 +146,3 @@
           return APR_SUCCESS;
   }
   
  -
  -
  -apr_status_t apr_get_hostname(char **name, apr_interface_e which, apr_socket_t *sock)
  -{
  -    struct hostent *hptr;
  -    apr_in_addr_t sa_ptr;
  -
  -    if (which == APR_LOCAL)
  -        sa_ptr = sock->local_addr->sa.sin.sin_addr;
  -    else if (which == APR_REMOTE)
  -        sa_ptr = sock->remote_addr->sa.sin.sin_addr;
  -    else
  -        return APR_EINVAL;
  -
  -    hptr = gethostbyaddr((char *)&sa_ptr, sizeof(struct in_addr), AF_INET);
  -
  -    if (hptr != NULL) {
  -        *name = apr_pstrdup(sock->cntxt, hptr->h_name);
  -        if (*name) {
  -            return APR_SUCCESS;
  -        }
  -        return APR_ENOMEM;
  -    }
  -
  -    /* XXX - Is this threadsafe? */
  -    return h_errno;
  -}
  
  
  
  1.40      +0 -26     apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- sockopt.c	2000/11/18 16:31:52	1.39
  +++ sockopt.c	2000/12/18 17:00:42	1.40
  @@ -222,29 +222,3 @@
           return APR_SUCCESS;
   }
   
  -apr_status_t apr_get_hostname(char **name, apr_interface_e which, apr_socket_t *sock)
  -{
  -    struct hostent *hptr;
  -    apr_in_addr_t sa_ptr;
  -
  -    if (which == APR_LOCAL)
  -        sa_ptr = sock->local_addr->sa.sin.sin_addr;
  -    else if (which == APR_REMOTE)
  -        sa_ptr = sock->remote_addr->sa.sin.sin_addr;
  -    else
  -        return APR_EINVAL;
  -
  -    hptr = gethostbyaddr((char *)&sa_ptr, sizeof(struct in_addr), APR_INET);
  -
  -    if (hptr != NULL) {
  -        *name = apr_pstrdup(sock->cntxt, hptr->h_name);
  -        if (*name) {
  -            return APR_SUCCESS;
  -        }
  -        return APR_ENOMEM;
  -    }
  -
  -    /* XXX - Is referencing h_errno threadsafe? */
  -    return (h_errno + APR_OS_START_SYSERR);
  -}
  -
  
  
  
  1.30      +0 -25     apr/network_io/win32/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/win32/sockopt.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- sockopt.c	2000/11/16 01:51:36	1.29
  +++ sockopt.c	2000/12/18 17:00:43	1.30
  @@ -201,29 +201,4 @@
           return APR_SUCCESS;
   }
   
  -apr_status_t apr_get_hostname(char **name, apr_interface_e which, apr_socket_t *sock)
  -{
  -    struct hostent *hptr;
  -    apr_in_addr_t sa_ptr;
  -
  -    if (which == APR_LOCAL)
  -        sa_ptr = sock->local_addr->sa.sin.sin_addr;
  -    else if (which == APR_REMOTE)
  -        sa_ptr = sock->remote_addr->sa.sin.sin_addr;
  -    else
  -        return APR_EINVAL;
  -
  -    hptr = gethostbyaddr((char *)&sa_ptr, sizeof(struct in_addr), AF_INET);
  -
  -    if (hptr != NULL) {
  -        *name = apr_pstrdup(sock->cntxt, hptr->h_name);
  -        if (*name) {
  -            return APR_SUCCESS;
  -        }
  -        return APR_ENOMEM;
  -    }
  -
  -    return apr_get_netos_error();
  -}
  -
   
  
  
  

Mime
View raw message