httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r425759 - /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c
Date Wed, 26 Jul 2006 15:21:20 GMT
Author: jfclere
Date: Wed Jul 26 08:21:19 2006
New Revision: 425759

URL: http://svn.apache.org/viewvc?rev=425759&view=rev
Log:
Try to have something that has the right size.
The remaining problem is that proxy_lb_workers() only gives a good value when
the config file has been parsed (can't be used in preconfig().

Modified:
    httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c

Modified: httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c?rev=425759&r1=425758&r2=425759&view=diff
==============================================================================
--- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c (original)
+++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c Wed Jul 26 08:21:19
2006
@@ -87,7 +87,19 @@
 
 static apr_status_t ap_slotmem_attach(ap_slotmem_t **new, const char *name, apr_size_t *item_size,
int *item_num, apr_pool_t *pool)
 {
-    return(ap_slotmem_create(new, name, item_size, item_num, pool));
+    apr_size_t size;
+    int num;
+    apr_status_t rv;
+
+    size = sizeof(lb_score);
+    /* XXX: proxy_lb_workers only returns something valid after parsing the configuration
*/
+    num =  proxy_lb_workers();
+    rv = ap_slotmem_create(new, name, size, num, pool);
+    if (rv == APR_SUCCESS) {
+        *item_size = size;
+        *item_num = num;
+    }
+    return rv;
 }
 
 static apr_status_t ap_slotmem_mem(ap_slotmem_t *score, int id, void**mem)
@@ -112,6 +124,7 @@
 static const slotmem_storage_method storage = {
     &ap_slotmem_do,
     &ap_slotmem_create,
+    &ap_slotmem_attach,
     &ap_slotmem_mem
 };
 



Mime
View raw message