You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@locus.apache.org on 2000/08/26 11:57:42 UTC

cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c

dreid       00/08/26 02:57:41

  Modified:    src/lib/apr/network_io/beos sockopt.c
  Log:
  Adjust the TCP_NODELAY code for the older BeOS stack...
  
  Revision  Changes    Path
  1.24      +11 -3     apache-2.0/src/lib/apr/network_io/beos/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockopt.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- sockopt.c	2000/08/22 15:09:21	1.23
  +++ sockopt.c	2000/08/26 09:57:41	1.24
  @@ -108,9 +108,17 @@
           sock->timeout = on; 
       } 
       if (opt & APR_TCP_NODELAY) {
  -        if (setsockopt(sock->socketdes, IPPROTO_TCP, TCP_NODELAY, (void *)&on, sizeof(int)) == -1) {
  -            return errno;
  -        }
  +        /* BeOS pre-BONE has TCP_NODELAY set to ON by default.
  +         * This is a hang over from a long time ago and until BONE there
  +         * is no way to turn it off.  Use this information as follows...
  +         *
  +         * on == 0 - return APR_ENOTIMPL
  +         * on == 1 - allow it to return APR_SUCCESS
  +         *
  +         * based on information from Howard Berkey (howard@be.com)
  +         */
  +        if (! on)
  +            return APR_ENOTIMPL;
       }
       return APR_SUCCESS;
   }