dgaudet 97/06/26 18:51:54
Modified: src Tag: APACHE_1_2_X CHANGES http_main.c mod_status.c scoreboard.h Log: PR#566: mod_status dumps core in inetd mode Submitted by: Marc Slemko and Roy Fielding Reviewed by: Marc Slemko, Roy Fielding, Alexei Kosut Revision Changes Path No revision No revision 1.286.2.3 +3 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.286.2.2 retrieving revision 1.286.2.3 diff -C3 -r1.286.2.2 -r1.286.2.3 *** CHANGES 1997/06/27 01:47:43 1.286.2.2 --- CHANGES 1997/06/27 01:51:48 1.286.2.3 *************** *** 1,5 **** --- 1,8 ---- Changes with Apache 1.2.1 + *) PR#566: mod_status dumps core in inetd mode. + [Marc Slemko and Roy Fielding] + *) Attempt to work around problems with third party libraries that do not handle high numbered descriptors (examples include bind, and solaris libc). On all systems apache attempts to keep all permanent 1.149.2.2 +5 -0 apache/src/http_main.c Index: http_main.c =================================================================== RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.149.2.1 retrieving revision 1.149.2.2 diff -C3 -r1.149.2.1 -r1.149.2.2 *** http_main.c 1997/06/27 01:47:46 1.149.2.1 --- http_main.c 1997/06/27 01:51:49 1.149.2.2 *************** *** 941,946 **** --- 941,951 ---- #endif } + int exists_scoreboard_image () + { + return (scoreboard_image ? 1 : 0); + } + int update_child_status (int child_num, int status, request_rec *r) { int old_status; 1.47.2.1 +9 -1 apache/src/mod_status.c Index: mod_status.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_status.c,v retrieving revision 1.47 retrieving revision 1.47.2.1 diff -C3 -r1.47 -r1.47.2.1 *** mod_status.c 1997/05/08 08:23:31 1.47 --- mod_status.c 1997/06/27 01:51:50 1.47.2.1 *************** *** 95,100 **** --- 95,101 ---- #include "util_script.h" #include <time.h> #include "scoreboard.h" + #include "http_log.h" #ifdef NEXT #include <machine/param.h> *************** *** 229,235 **** status[SERVER_BUSY_DNS]='D'; status[SERVER_GRACEFUL]='G'; ! if (r->method_number != M_GET) return NOT_IMPLEMENTED; r->content_type = "text/html"; /* --- 230,243 ---- status[SERVER_BUSY_DNS]='D'; status[SERVER_GRACEFUL]='G'; ! if (!exists_scoreboard_image()) { ! log_printf(r->server, "Server status unavailable in inetd mode"); ! return HTTP_NOT_IMPLEMENTED; ! } ! r->allowed = (1 << M_GET) | (1 << M_TRACE); ! if (r->method_number != M_GET) return HTTP_METHOD_NOT_ALLOWED; ! if (!exists_scoreboard_image()) return HTTP_NOT_IMPLEMENTED; ! r->content_type = "text/html"; /* 1.21.2.1 +1 -1 apache/src/scoreboard.h Index: scoreboard.h =================================================================== RCS file: /export/home/cvs/apache/src/scoreboard.h,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -C3 -r1.21 -r1.21.2.1 *** scoreboard.h 1997/04/24 23:35:23 1.21 --- scoreboard.h 1997/06/27 01:51:50 1.21.2.1 *************** *** 107,110 **** extern void sync_scoreboard_image(void); short_score get_scoreboard_info(int x); ! --- 107,110 ---- extern void sync_scoreboard_image(void); short_score get_scoreboard_info(int x); ! int exists_scoreboard_image ();