Jim Jagielski wrote:
On May 5, 2009, at 3:08 PM, Ruediger Pluem wrote:
@@ -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.
Plus, it cleans things up and keeps the PROXY_DECLARE such that
we don't need to worry about an API bump
{
- 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?
+1
I'm guessing jfc simply kept the code the same with no optimizations :)
I hurried to commit before you :-) - My bad: Sorry -
Cheers
Jean-Frederic