apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/strings apr_snprintf.c
Date Fri, 15 Mar 2002 17:42:06 GMT
trawick     02/03/15 09:42:06

  Modified:    strings  apr_snprintf.c
  Log:
  clean up the use of apr_sockaddr_t (stay out of family-specific
  struct sockaddr* as much as possible)
  
  Revision  Changes    Path
  1.22      +2 -3      apr/strings/apr_snprintf.c
  
  Index: apr_snprintf.c
  ===================================================================
  RCS file: /home/cvs/apr/strings/apr_snprintf.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- apr_snprintf.c	14 Mar 2002 16:29:51 -0000	1.21
  +++ apr_snprintf.c	15 Mar 2002 17:42:05 -0000	1.22
  @@ -501,13 +501,12 @@
       int sub_len;
       char *ipaddr_str;
   
  -    /* XXX IPv6: this assumes sin_port and sin6_port are at same offset */
  -    p = conv_10(ntohs(sa->sa.sin.sin_port), TRUE, &is_negative, p, &sub_len);
  +    p = conv_10(sa->port, TRUE, &is_negative, p, &sub_len);
       *--p = ':';
       apr_sockaddr_ip_get(&ipaddr_str, sa);
       sub_len = strlen(ipaddr_str);
   #if APR_HAVE_IPV6
  -    if (sa->sa.sin.sin_family == APR_INET6 &&
  +    if (sa->family == APR_INET6 &&
           !IN6_IS_ADDR_V4MAPPED(&sa->sa.sin6.sin6_addr)) {
           *(p - 1) = ']';
           p -= sub_len + 2;
  
  
  

Mime
View raw message