Author: jfrederic.clere(a)jboss.com
Date: 2009-03-05 06:06:23 -0500 (Thu, 05 Mar 2009)
New Revision: 2336
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
fix warnings.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-03-05 09:27:30 UTC
(rev 2335)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-03-05 11:06:23 UTC
(rev 2336)
@@ -48,6 +48,11 @@
#include "balancer.h"
#include "sessionid.h"
+#if APR_HAVE_UNISTD_H
+/* for getpid() */
+#include <unistd.h>
+#endif
+
struct proxy_cluster_helper {
int count_active; /* currently active request using the worker */
#if AP_MODULE_MAGIC_AT_LEAST(20051115,4)
@@ -271,14 +276,7 @@
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server,
"Created: reusing worker for %s", url);
if ((*worker)->cp->pool == NULL) {
- /* Copied for init_conn_pool in modules/proxy/proxy_util.c */
- apr_pool_t *pool;
- proxy_conn_pool *cp;
- apr_pool_create(&pool, conf->pool);
- apr_pool_tag(pool, "proxy_worker_cp");
- cp = (proxy_conn_pool *)apr_pcalloc(conf->pool, sizeof(proxy_conn_pool));
- cp->pool = pool;
- (*worker)->cp = cp;
+ init_conn_pool(conf->pool, *worker);
}
reuse = 1;
} else {
@@ -604,7 +602,6 @@
{
int *id, size, i;
apr_time_t now;
- int notok = 0;
now = apr_time_now();
@@ -641,7 +638,6 @@
{
int *id, size, i;
apr_time_t now;
- int notok = 0;
now = apr_time_sec(apr_time_now());
Show replies by date