]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy_balancer: follow up to r1830800.
authorYann Ylavic <ylavic@apache.org>
Wed, 9 May 2018 01:23:59 +0000 (01:23 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 9 May 2018 01:23:59 +0000 (01:23 +0000)
commit21cdbc98542e5bf2ab504392f6d3328006a193f4
treea9feb07ceed1a85793a315574a3f31c7013696c4
parent483864045c36ca1e49834144f9ac9544f15ea999
mod_proxy_balancer: follow up to r1830800.

Don't call slotmem_attach() if the slot is already initialized/reused, that
used to work previously because the returned error status is ignored, but
r1830800 changed the function to forcibly reset the returned slot pointer to
NULL first.

There is no point to call slotmem_attach() in this case, the slot is already
initialized because it's either inherited/fork()ed on Unixes, or on Windows
the attachment happened in post_config/slotmem_create() already.

One case where slotmem_attach() would fail is when balancers are defined
globally (main server) and some virtualhosts don't have/use any mod_proxy
configuration/directive. In this case their proxy server config is a pointer
copy of the main server thus their slots are already initialized in both
post_config and child_init hooks. While the case was already handled in
the balancer_post_config(), it did not in balancer_child_init() where we
relied on slotmem_attach() to be a noop.

[Reverted by r1831396]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831218 13f79535-47bb-0310-9956-ffa450edef68
modules/proxy/mod_proxy_balancer.c