From e5c09e041d1517649616d0d4b072422802a69f08 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 19 Sep 2024 09:20:03 +0200 Subject: [PATCH] s3:rpcclient: make use of dcerpc_binding_handle_get_transport() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/rpcclient/rpcclient.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 6df33e04278..95b6baf32b0 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -396,13 +396,17 @@ static NTSTATUS cmd_set_transport(struct dcerpc_binding *b) struct cmd_set *tmp_set; for (tmp_set = tmp->cmd_set; tmp_set->name; tmp_set++) { + struct dcerpc_binding_handle *tmp_b = NULL; + enum dcerpc_transport_t tmp_t; + if (tmp_set->rpc_pipe == NULL) { continue; } - if (tmp_set->rpc_pipe->transport->transport != t) { + tmp_b = tmp_set->rpc_pipe->binding_handle; + tmp_t = dcerpc_binding_handle_get_transport(tmp_b); + if (tmp_t != t) { TALLOC_FREE(tmp_set->rpc_pipe); - tmp_set->rpc_pipe = NULL; } } }