httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: apache-1.3/src/main http_main.c
Date Mon, 16 Jul 2001 06:20:40 GMT
dirkx       01/07/15 23:20:40

  Modified:    src/main http_main.c
  Log:
  All stable/release versions of FreeBSD, pre- and post SO_ACCEPTFILTER
  will give ENOPROTO. So ENOENT can go. Also it is sometimes hard to find
  out what the kernel status is; this change in logging will give the
  user at least a chance to figure out what is happening.
  
  Revision  Changes    Path
  1.545     +8 -5      apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.544
  retrieving revision 1.545
  diff -u -r1.544 -r1.545
  --- http_main.c	2001/07/13 21:25:47	1.544
  +++ http_main.c	2001/07/16 06:20:39	1.545
  @@ -3450,11 +3450,14 @@
   	struct accept_filter_arg af = {
   	    ACCEPT_FILTER_NAME, ""
   	};
  -	if ((setsockopt(s, SOL_SOCKET, SO_ACCEPTFILTER, &af, sizeof(af)) < 0)
  -            && (errno != ENOENT) && (errno != ENOPROTOOPT)) {
  -	    ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf,
  -			 "make_sock: for %s, setsockopt: (SO_ACCEPTFILTER)",
  -			 addr);
  +	if (setsockopt(s, SOL_SOCKET, SO_ACCEPTFILTER, &af, sizeof(af)) < 0) {
  +            if (errno == ENOPROTOOPT) {
  +	    	ap_log_error(APLOG_MARK, APLOG_INFO | APLOG_NOERRNO, server_conf,
  +			 "socket option SO_ACCEPTFILTER unkown on this machine. Continuing.");
  +	     } else {
  +	    	ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_INFO, server_conf,
  +			 "make_sock: for %s, setsockopt: (SO_ACCEPTFILTER)", addr);
  +	     }
   	}
       }
   #endif
  
  
  

Mime
View raw message