apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/network_io/unix sockopt.c
Date Fri, 04 Apr 2003 11:47:40 GMT
trawick     2003/04/04 03:47:40

  Modified:    .        CHANGES
               network_io/unix sockopt.c
  Log:
  Implement APR_SO_RCVBUF socket option on Unix.
  
  Submitted by:   Adam Sussman <myddryn@vishnu.vidya.com>
  Reviewed by:    Jeff Trawick
  
  Revision  Changes    Path
  1.396     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.395
  retrieving revision 1.396
  diff -u -r1.395 -r1.396
  --- CHANGES	1 Apr 2003 22:28:35 -0000	1.395
  +++ CHANGES	4 Apr 2003 11:47:39 -0000	1.396
  @@ -1,5 +1,8 @@
   Changes with APR 0.9.4
   
  +  *) Implement APR_SO_RCVBUF socket option on Unix.  
  +     [Adam Sussman <myddryn@vishnu.vidya.com>]
  +
     *) Don't add the math library (-lm) if the modf() function
        is already available via libc.  [Roy Fielding]
   
  
  
  
  1.68      +12 -0     apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- sockopt.c	24 Feb 2003 23:13:29 -0000	1.67
  +++ sockopt.c	4 Apr 2003 11:47:40 -0000	1.68
  @@ -198,6 +198,18 @@
           return APR_ENOTIMPL;
   #endif
           break;
  +    case APR_SO_RCVBUF:
  +#ifdef SO_RCVBUF
  +        if (apr_is_option_set(sock->netmask, APR_SO_RCVBUF) != on) {
  +            if (setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVBUF, (void *)&on,
sizeof(int)) == -1) {
  +                return errno;
  +            }
  +            apr_set_option(&sock->netmask, APR_SO_RCVBUF, on);
  +        }
  +#else
  +        return APR_ENOTIMPL;
  +#endif
  +        break;
       case APR_SO_NONBLOCK:
           if (apr_is_option_set(sock->netmask, APR_SO_NONBLOCK) != on) {
               if (on) {
  
  
  

Mime
View raw message