You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/10/24 05:50:24 UTC
svn commit: r587770 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h
include/scoreboard.h modules/generators/mod_status.c server/scoreboard.c
Author: wrowe
Date: Tue Oct 23 20:50:24 2007
New Revision: 587770
URL: http://svn.apache.org/viewvc?rev=587770&view=rev
Log:
MMN major bump required; this API is altogether inconsistent, transparent
types should be opaque, opaque types should be transparent.
Solve one aspect, follow the _by_indexes() example for ap_get_scoreboard_worker
family of functions, and the primary one will now accept the abstracted conn_rec
value of sbh to find that connections slot.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/include/ap_mmn.h
httpd/httpd/trunk/include/scoreboard.h
httpd/httpd/trunk/modules/generators/mod_status.c
httpd/httpd/trunk/server/scoreboard.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=587770&r1=587769&r2=587770&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Oct 23 20:50:24 2007
@@ -2,6 +2,11 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) core; scoreboard: ap_get_scoreboard_worker(sbh) now takes the sbh member
+ from the connection rec, ap_get_scoreboard_worker(proc, thread) will now
+ provide the unusual legacy lookup. Also cleans up PR 31127 range checks.
+ [William Rowe, Christian von Roques <roques mti.ag>]
+
*) mod_proxy_http: Check but don't escape/unescape forward-proxied URLs
PR 42592 [Nick Kew]
Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=587770&r1=587769&r2=587770&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Tue Oct 23 20:50:24 2007
@@ -133,15 +133,16 @@
* 20070823.0 (2.3.0-dev) Removed ap_all_available_mutexes_string,
* ap_available_mutexes_string for macros
* 20070823.1 (2.3.0-dev) add ap_send_interim_response()
- *
+ * 20071023.0 (2.3.0-dev) add ap_get_scoreboard(sbh) split from the less
+ * conventional ap_get_scoreboard(proc, thread)
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20070823
+#define MODULE_MAGIC_NUMBER_MAJOR 20071023
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
Modified: httpd/httpd/trunk/include/scoreboard.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/scoreboard.h?rev=587770&r1=587769&r2=587770&view=diff
==============================================================================
--- httpd/httpd/trunk/include/scoreboard.h (original)
+++ httpd/httpd/trunk/include/scoreboard.h Tue Oct 23 20:50:24 2007
@@ -178,7 +178,9 @@
int status, request_rec *r);
void ap_time_process_request(ap_sb_handle_t *sbh, int status);
-AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y);
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh);
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker_from_indexes(int child_num,
+ int thread_num);
AP_DECLARE(process_score *) ap_get_scoreboard_process(int x);
AP_DECLARE(global_score *) ap_get_scoreboard_global(void);
AP_DECLARE(lb_score *) ap_get_scoreboard_lb(int lb_num);
Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=587770&r1=587769&r2=587770&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Tue Oct 23 20:50:24 2007
@@ -319,7 +319,7 @@
for (j = 0; j < thread_limit; ++j) {
int indx = (i * thread_limit) + j;
- ws_record = ap_get_scoreboard_worker(i, j);
+ ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
res = ws_record->status;
stat_buffer[indx] = status_flags[res];
@@ -558,7 +558,7 @@
for (i = 0; i < server_limit; ++i) {
for (j = 0; j < thread_limit; ++j) {
- ws_record = ap_get_scoreboard_worker(i, j);
+ ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
if (ws_record->access_count == 0 &&
(ws_record->status == SERVER_READY ||
Modified: httpd/httpd/trunk/server/scoreboard.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/scoreboard.c?rev=587770&r1=587769&r2=587770&view=diff
==============================================================================
--- httpd/httpd/trunk/server/scoreboard.c (original)
+++ httpd/httpd/trunk/server/scoreboard.c Tue Oct 23 20:50:24 2007
@@ -475,13 +475,19 @@
}
}
-AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y)
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker_from_indexes(int x, int y)
{
- if (((x < 0) || (x >= server_limit)) ||
- ((y < 0) || (y >= thread_limit))) {
+ if (((x < 0) || (x > server_limit)) ||
+ ((y < 0) || (y > thread_limit))) {
return(NULL); /* Out of range */
}
return &ap_scoreboard_image->servers[x][y];
+}
+
+AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh)
+{
+ return ap_get_scoreboard_worker_from_indexes(sbh->child_num,
+ sbh->thread_num);
}
AP_DECLARE(process_score *) ap_get_scoreboard_process(int x)