winbind: directly use dcerpc_binding_handle_is_connected() in reset_connection_on_err...
authorRalph Boehme <slow@samba.org>
Fri, 7 Aug 2020 10:07:28 +0000 (12:07 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 8 Aug 2020 10:59:38 +0000 (10:59 +0000)
In the end we should avoid rpccli_is_connected(), rpccli_set_timeout() and the
whole rpc_pipe_client concept.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14457

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Aug  8 10:59:38 UTC 2020 on sn-devel-184

source3/winbindd/winbindd_samr.c

index 396e2c97709b4013e2918e363ba4022a19150dbe..5681a760bd1a3a37b5391cc374b9e0b853f89aa9 100644 (file)
@@ -185,6 +185,7 @@ static bool reset_connection_on_error(struct winbindd_domain *domain,
                                      NTSTATUS status)
 {
        struct winbind_internal_pipes *internal_pipes = NULL;
+       struct dcerpc_binding_handle *b = p->binding_handle;
 
        internal_pipes = talloc_get_type_abort(
                domain->private_data, struct winbind_internal_pipes);
@@ -197,7 +198,7 @@ static bool reset_connection_on_error(struct winbindd_domain *domain,
                return true;
        }
 
-       if (!rpccli_is_connected(p)) {
+       if (!dcerpc_binding_handle_is_connected(b)) {
                TALLOC_FREE(internal_pipes);
                domain->private_data = NULL;
                return true;