tldap: Centralize connection rundown on error
commitf83e351bafb2b73bfb87714872c667af4dc2f277
authorVolker Lendecke <vl@samba.org>
Tue, 11 Aug 2020 15:30:22 +0000 (11 17:30 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 31 Aug 2020 09:26:36 +0000 (31 09:26 +0000)
tree8c500b596ba1986c94db8fd7c175c29c14af703f
parent8888586f7b2aa791f14d599960ccf32e3e9ca76a
tldap: Centralize connection rundown on error

Whenever send or recv return -1, we have to cancel all pending
requests and our transport stream is no longer usable: Discard it upon
such an error.

To avoid duplicate state, tldap_connection_ok() now looks at whether
we have a tstream_context around.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14465

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f745f5b12560dbcb7be6f3ffb3bc10704c87149c)
source3/lib/tldap.c