You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/07/26 16:12:39 UTC
cvs commit: apache-2.0/src/include mpm_common.h
trawick 00/07/26 07:12:38
Modified: src/main mpm_common.c
src/include mpm_common.h
Log:
Get ap_socket_disable_nagle() working again.
Submitted by: Greg Ames
Reviewed by: Jeff Trawick
Revision Changes Path
1.25 +4 -1 apache-2.0/src/main/mpm_common.c
Index: mpm_common.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/mpm_common.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- mpm_common.c 2000/07/25 01:06:26 1.24
+++ mpm_common.c 2000/07/26 14:12:38 1.25
@@ -77,6 +77,9 @@
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for timeval definitions */
#endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h> /* for setsockopt prototype */
+#endif
#if defined(DEXTER) || defined(MPMT_BEOS_MPM) || defined(BEOS_MPM)
#define CHILD_TABLE 1
@@ -290,7 +293,7 @@
*/
int just_say_no = 1;
- if (ap_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no,
+ if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no,
sizeof(int)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
"setsockopt: (TCP_NODELAY)");
1.6 +4 -0 apache-2.0/src/include/mpm_common.h
Index: mpm_common.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/mpm_common.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mpm_common.h 2000/07/10 22:08:07 1.5
+++ mpm_common.h 2000/07/26 14:12:38 1.6
@@ -74,6 +74,10 @@
extern "C" {
#endif
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h> /* for TCP_NODELAY */
+#endif
+
void ap_reclaim_child_processes(int terminate);
void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p);
void ap_process_child_status(ap_proc_t *pid, ap_wait_t status);
Re: cvs commit: apache-2.0/src/include mpm_common.h
Posted by Jeff Trawick <tr...@bellsouth.net>.
trawick@locus.apache.org writes:
> trawick 00/07/26 07:12:38
>
> Modified: src/main mpm_common.c
> src/include mpm_common.h
> Log:
> Get ap_socket_disable_nagle() working again.
> Submitted by: Greg Ames
> Reviewed by: Jeff Trawick
>
This change is merely (?) intended to get Nagle disabled again;
this code still could be APR-ized. We could get a benefit from
APR-ization (on Linux, at least) if APR is willing to remember in the
ap_socket_t that TCP_NODELAY had been set. On Linux, this would save
a syscall in ap_sendfile(). (As always, it is nice to have working
code up until the point that somebody wants to implement an improvement
:) )
--
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...