httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r574269 - in /httpd/httpd/trunk: include/scoreboard.h modules/proxy/mod_proxy.c modules/proxy/mod_proxy.h modules/proxy/proxy_util.c
Date Mon, 10 Sep 2007 14:54:02 GMT
Author: jim
Date: Mon Sep 10 07:54:01 2007
New Revision: 574269

URL: http://svn.apache.org/viewvc?rev=574269&view=rev
Log:
Maintain the illusion. It's not worth my time or
energy to care about this anymore.

Modified:
    httpd/httpd/trunk/include/scoreboard.h
    httpd/httpd/trunk/modules/proxy/mod_proxy.c
    httpd/httpd/trunk/modules/proxy/mod_proxy.h
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/include/scoreboard.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/scoreboard.h?rev=574269&r1=574268&r2=574269&view=diff
==============================================================================
--- httpd/httpd/trunk/include/scoreboard.h (original)
+++ httpd/httpd/trunk/include/scoreboard.h Mon Sep 10 07:54:01 2007
@@ -45,9 +45,6 @@
 #define DEFAULT_SCOREBOARD "logs/apache_runtime_status"
 #endif
 
-/* for proxy_worker_stat */
-#include "../modules/proxy/mod_proxy.h"
-
 /* Scoreboard info on a process is, for now, kept very brief --- 
  * just status value and pid (the latter so that the caretaker process
  * can properly update the scoreboard when a process dies).  We may want
@@ -145,7 +142,11 @@
 };
 
 /* stuff which is lb specific */
-typedef proxy_worker_stat lb_score;
+typedef struct lb_score lb_score;
+struct lb_score {
+    /* TODO: make a real stuct from this */
+    unsigned char data[1024];
+};
 
 /* Scoreboard is now in 'local' memory, since it isn't updated once created,
  * even in forked architectures.  Child created-processes (non-fork) will

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=574269&r1=574268&r2=574269&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Mon Sep 10 07:54:01 2007
@@ -37,26 +37,6 @@
 #define MAX(x,y) ((x) >= (y) ? (x) : (y))
 #endif
 
-/* Global balancer counter */
-static int lb_workers_limit = 0;
-
-/**
- * Calculate number of maximum number of workers in scoreboard.
- * @return  number of workers to allocate in the scoreboard
- */
-static int ap_proxy_lb_workers(void)
-{
-    /*
-     * Since we can't resize the scoreboard when reconfiguring, we
-     * have to impose a limit on the number of workers, we are
-     * able to reconfigure to.
-     */
-    if (!lb_workers_limit)
-        lb_workers_limit = proxy_lb_workers + PROXY_DYNAMIC_BALANCER_LIMIT;
-    return lb_workers_limit;
-}
-
-
 /*
  * A Web proxy module. Stages:
  *

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?rev=574269&r1=574268&r2=574269&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Mon Sep 10 07:54:01 2007
@@ -730,6 +730,11 @@
  * If this limit is reached you must stop and restart the server.
  */
 #define PROXY_DYNAMIC_BALANCER_LIMIT    16
+/**
+ * Calculate number of maximum number of workers in scoreboard.
+ * @return  number of workers to allocate in the scoreboard
+ */
+int ap_proxy_lb_workers(void);
 
 /* For proxy_util */
 extern module PROXY_DECLARE_DATA proxy_module;

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=574269&r1=574268&r2=574269&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Mon Sep 10 07:54:01 2007
@@ -31,6 +31,7 @@
 
 /* Global balancer counter */
 int PROXY_DECLARE_DATA proxy_lb_workers = 0;
+static int lb_workers_limit = 0;
 
 static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r);
 static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r);
@@ -2311,6 +2312,18 @@
     apr_socket_timeout_set(conn->sock, current_timeout);
 
     return OK;
+}
+
+int ap_proxy_lb_workers(void)
+{
+    /*
+     * Since we can't resize the scoreboard when reconfiguring, we
+     * have to impose a limit on the number of workers, we are
+     * able to reconfigure to.
+     */
+    if (!lb_workers_limit)
+        lb_workers_limit = proxy_lb_workers + PROXY_DYNAMIC_BALANCER_LIMIT;
+    return lb_workers_limit;
 }
 
 PROXY_DECLARE(void) ap_proxy_backend_broke(request_rec *r,



Mime
View raw message