MEDIUM: connection: add a flag to hold the transport layer
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Oct 2012 15:50:05 +0000 (17:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Oct 2012 18:30:50 +0000 (20:30 +0200)
commit1e954913de12a19a54db681edcfb3b8150cceee4
tree77145066d24cea6fa0b7687e0c65adfbeab5e912
parent91083f5c8fa5b0ae257d9c14e4b1d6b3fbbf77ab
MEDIUM: connection: add a flag to hold the transport layer

When we start logging SSL information, we need the SSL struct to be
present even past the conn_xprt_close() call. In order to achieve this,
we should use refcounting on the connection and the transport layer. At
the moment it's not worth using plain refcounting as only the logs require
this, so instead of real refcounting we just use a flag which will be set
by the log subsystem when SSL data need to be logged.

What happens then is that the xprt->close() call is ignored and the
transport layer is closed again during session_free(), after the log
line is emitted.
include/proto/connection.h
include/types/connection.h
src/session.c