httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r771940 - in /httpd/httpd/trunk/modules/proxy: ./ balancers/ examples/
Date Tue, 05 May 2009 19:08:45 GMT


On 05/05/2009 07:15 PM, jfclere@apache.org wrote:
> Author: jfclere
> Date: Tue May  5 17:15:48 2009
> New Revision: 771940
> 
> URL: http://svn.apache.org/viewvc?rev=771940&view=rev
> Log:
> Change the order of mod_proxy and mod_proxy_balancer child_init().
> Change the balancer workers area to the address of workers instead copying the workers.
> Arrange lbmethod accordingly.
> Move the creation of conf->forward worker to mod_proxy child_init().
> 
> Modified:
>     httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_bybusyness.c
>     httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_byrequests.c
>     httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_bytraffic.c
>     httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
>     httpd/httpd/trunk/modules/proxy/examples/mod_lbmethod_rr.c
>     httpd/httpd/trunk/modules/proxy/mod_proxy.c
>     httpd/httpd/trunk/modules/proxy/mod_proxy.h
>     httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
>     httpd/httpd/trunk/modules/proxy/proxy_util.c
> 

> @@ -1471,13 +1471,13 @@
>  
>  PROXY_DECLARE(void)
>  ap_proxy_add_worker_to_balancer(apr_pool_t *pool, proxy_balancer *balancer,
> -                                proxy_worker *worker)
> +                                proxy_worker **worker)

IMHO providing *worker as the old code does is sufficient.

>  {
> -    proxy_worker *runtime;
> +    proxy_worker **runtime;
>  
>      runtime = apr_array_push(balancer->workers);
> -    memcpy(runtime, worker, sizeof(proxy_worker));
> -    runtime->id = proxy_lb_workers;
> +    memcpy(runtime, worker, sizeof(proxy_worker *));

Do we really need memcpy here? Shouldn't

*runtime = *worker

be sufficient or in the case that we go back to the old
function prototype shouldn't

*runtime = worker

be enough?

Regards

RĂ¼diger


Mime
View raw message