Author: trawick Date: Tue Jun 14 03:28:28 2005 New Revision: 190570 URL: http://svn.apache.org/viewcvs?rev=190570&view=rev Log: send and receive buffer sizes are not flags, and caller may pass different values on different calls; so don't try to optimize this setsockopt() SO_LINGER is an odd one; the real setsockopt provides a configurable value for the timeout; but with APR, this is a flag and the timeout; so the optimization stays for this one Reviewed by: Joe Orton Modified: apr/apr/branches/1.1.x/network_io/unix/sockopt.c Modified: apr/apr/branches/1.1.x/network_io/unix/sockopt.c URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/network_io/unix/sockopt.c?rev=190570&r1=190569&r2=190570&view=diff ============================================================================== --- apr/apr/branches/1.1.x/network_io/unix/sockopt.c (original) +++ apr/apr/branches/1.1.x/network_io/unix/sockopt.c Tue Jun 14 03:28:28 2005 @@ -149,11 +149,8 @@ break; case APR_SO_SNDBUF: #ifdef SO_SNDBUF - if (apr_is_option_set(sock, APR_SO_SNDBUF) != on) { - if (setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDBUF, (void *)&on, sizeof(int)) == -1) { - return errno; - } - apr_set_option(sock, APR_SO_SNDBUF, on); + if (setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDBUF, (void *)&on, sizeof(int)) == -1) { + return errno; } #else return APR_ENOTIMPL; @@ -161,11 +158,8 @@ break; case APR_SO_RCVBUF: #ifdef SO_RCVBUF - if (apr_is_option_set(sock, APR_SO_RCVBUF) != on) { - if (setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVBUF, (void *)&on, sizeof(int)) == -1) { - return errno; - } - apr_set_option(sock, APR_SO_RCVBUF, on); + if (setsockopt(sock->socketdes, SOL_SOCKET, SO_RCVBUF, (void *)&on, sizeof(int)) == -1) { + return errno; } #else return APR_ENOTIMPL;