]> git.kaiwu.me - haproxy.git/commit
MEDIUM: session: detect applets from the session by using s->target
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Oct 2013 16:41:10 +0000 (18:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 14:40:22 +0000 (15:40 +0100)
commit7584b27956df8ea9a5920ac271799b1b78390620
treee3cccf7a37e692ef8e95cbd4976ccb9d495977cb
parent414e9bb806da169860f25bfe53f444a301e3b7e5
MEDIUM: session: detect applets from the session by using s->target

We used to rely on the stream interface's target to detect an applet
from within the session while trying to process the connection request,
but this is incorrect, as this target is the one currently connected
and not the next one to process. This will make a difference when we
later support keep-alive. The only "official" value indicating where
we want to connect is the session's target, which can be :
  - &applet : connect to this applet
  - NULL : connect using the normal LB algos
  - anything else : direct connection to some entity

Since we're interested in detecting the specific case of applets, it's
OK to make use of s->target then.

Also, applets are being isolated from connections, and as such there
will not be any ->connect method available when an applet is running,
so we can get rid of this test as well.
src/session.c