Loading modules/proxy/mod_proxy.h +2 −1 Changes for modules/proxy/mod_proxy.h: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -376,6 +376,7 @@ struct proxy_worker { proxy_conn_pool *cp; /* Connection pool to use */ proxy_worker_shared *s; /* Shared data */ proxy_balancer *balancer; /* which balancer am I in? */ apr_thread_mutex_t *tmutex; /* Thread lock for updating address cache */ void *context; /* general purpose storage */ }; Loading Loading @@ -413,7 +414,7 @@ struct proxy_balancer { const char *sname; /* filesystem safe balancer name */ apr_time_t wupdated; /* timestamp of last change to workers list */ apr_global_mutex_t *gmutex; /* global lock for updating list of workers */ apr_thread_mutex_t *tmutex; /* Thread lock for updating address cache and worker selection*/ apr_thread_mutex_t *tmutex; /* Thread lock for updating shm */ void *context; /* general purpose storage */ proxy_balancer_shared *s; /* Shared data */ }; Loading modules/proxy/mod_proxy_balancer.c +1 −0 Changes for modules/proxy/mod_proxy_balancer.c: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1373,6 +1373,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_update_members(proxy_balancer *b, server_re (*runtime)->cp = NULL; (*runtime)->balancer = b; (*runtime)->s = shm; (*runtime)->tmutex = NULL; if ((rv = ap_proxy_initialize_worker(*runtime, s, conf->pool)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot init worker"); return rv; Loading modules/proxy/proxy_util.c +11 −3 Changes for modules/proxy/proxy_util.c: 11 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -1467,7 +1467,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance rv = apr_thread_mutex_create(&(balancer->tmutex), APR_THREAD_MUTEX_DEFAULT, p); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "can not create thread mutex"); "can not create balancer thread mutex"); return rv; } } Loading Loading @@ -1890,6 +1890,14 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "initializing worker %s local", worker->s->name); /* Now init local worker data */ if (worker->tmutex == NULL) { rv = apr_thread_mutex_create(&(worker->tmutex), APR_THREAD_MUTEX_DEFAULT, p); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "can not create worker thread mutex"); return rv; } } if (worker->cp == NULL) init_conn_pool(p, worker); if (worker->cp == NULL) { Loading Loading @@ -2293,7 +2301,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, conn->pool); } else if (!worker->cp->addr) { if ((err = PROXY_THREAD_LOCK(worker->balancer)) != APR_SUCCESS) { if ((err = PROXY_THREAD_LOCK(worker)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "proxy: lock"); return HTTP_INTERNAL_SERVER_ERROR; Loading @@ -2310,7 +2318,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, conn->port, 0, worker->cp->pool); conn->addr = worker->cp->addr; if ((uerr = PROXY_THREAD_UNLOCK(worker->balancer)) != APR_SUCCESS) { if ((uerr = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, uerr, r->server, "proxy: unlock"); } Loading Loading
modules/proxy/mod_proxy.h +2 −1 Changes for modules/proxy/mod_proxy.h: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -376,6 +376,7 @@ struct proxy_worker { proxy_conn_pool *cp; /* Connection pool to use */ proxy_worker_shared *s; /* Shared data */ proxy_balancer *balancer; /* which balancer am I in? */ apr_thread_mutex_t *tmutex; /* Thread lock for updating address cache */ void *context; /* general purpose storage */ }; Loading Loading @@ -413,7 +414,7 @@ struct proxy_balancer { const char *sname; /* filesystem safe balancer name */ apr_time_t wupdated; /* timestamp of last change to workers list */ apr_global_mutex_t *gmutex; /* global lock for updating list of workers */ apr_thread_mutex_t *tmutex; /* Thread lock for updating address cache and worker selection*/ apr_thread_mutex_t *tmutex; /* Thread lock for updating shm */ void *context; /* general purpose storage */ proxy_balancer_shared *s; /* Shared data */ }; Loading
modules/proxy/mod_proxy_balancer.c +1 −0 Changes for modules/proxy/mod_proxy_balancer.c: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1373,6 +1373,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_update_members(proxy_balancer *b, server_re (*runtime)->cp = NULL; (*runtime)->balancer = b; (*runtime)->s = shm; (*runtime)->tmutex = NULL; if ((rv = ap_proxy_initialize_worker(*runtime, s, conf->pool)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot init worker"); return rv; Loading
modules/proxy/proxy_util.c +11 −3 Changes for modules/proxy/proxy_util.c: 11 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -1467,7 +1467,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance rv = apr_thread_mutex_create(&(balancer->tmutex), APR_THREAD_MUTEX_DEFAULT, p); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "can not create thread mutex"); "can not create balancer thread mutex"); return rv; } } Loading Loading @@ -1890,6 +1890,14 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "initializing worker %s local", worker->s->name); /* Now init local worker data */ if (worker->tmutex == NULL) { rv = apr_thread_mutex_create(&(worker->tmutex), APR_THREAD_MUTEX_DEFAULT, p); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "can not create worker thread mutex"); return rv; } } if (worker->cp == NULL) init_conn_pool(p, worker); if (worker->cp == NULL) { Loading Loading @@ -2293,7 +2301,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, conn->pool); } else if (!worker->cp->addr) { if ((err = PROXY_THREAD_LOCK(worker->balancer)) != APR_SUCCESS) { if ((err = PROXY_THREAD_LOCK(worker)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "proxy: lock"); return HTTP_INTERNAL_SERVER_ERROR; Loading @@ -2310,7 +2318,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, conn->port, 0, worker->cp->pool); conn->addr = worker->cp->addr; if ((uerr = PROXY_THREAD_UNLOCK(worker->balancer)) != APR_SUCCESS) { if ((uerr = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, uerr, r->server, "proxy: unlock"); } Loading