On Feb 6, 2011, at 9:02 AM, Ruediger Pluem wrote:
>>     /* Step 3.5: Update member list for the balancer */
>>     /* TODO: Implement as provider! */
>> -    /* proxy_update_members(balancer, r, conf); */
>> +    ap_proxy_update_members(*balancer, r->server, conf);
> 
> Don't we need a lock here as well or better simply doing a lock in 
> ap_proxy_update_members?
> 

I will be honest: I haven't really added in the required
locking cases yet... so there are a few places where we should
lock, but we don't yet.

>> +    for (index = 0; index < b->max_workers; index++) {
>> +        int found;
>> +        apr_status_t rv;
>> +        if ((rv = storage->dptr(b->slot, index, (void *)&shm)) != 
>> APR_SUCCESS) {
>> +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker 
>> slotmem_dptr failed");
>> +            return APR_EGENERAL;
>> +        }
>> +        if (!shm->hash)
>> +            continue;
> 
> Can't we do a break here?

Not really, because in the future we will be, when we
delete members, creating "holes" in the inuse array, and
so we will need to go thru all the available slots
to account for those.

Reply via email to