tldap: Centralize connection rundown on error
authorVolker Lendecke <vl@samba.org>
Tue, 11 Aug 2020 15:30:22 +0000 (17:30 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 3 Sep 2020 13:34:10 +0000 (13:34 +0000)
commit468286f4c8a77465d9e7bb3d058219f5a20024b2
tree27f624db120b879764eb858528ccc4b383481153
parent4b02185ecc11f096a47be5630f0f0b273ba2cd90
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