From: Noel Power Date: Wed, 23 Aug 2023 11:06:02 +0000 (+0100) Subject: add accessor for tstream_context X-Git-Tag: talloc-2.4.2~1030 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47a0dc6fa6c983bed65d2e950845ae47e1f4df64;p=thirdparty%2Fsamba.git add accessor for tstream_context Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/source3/rpc_client/rpc_transport.h b/source3/rpc_client/rpc_transport.h index dccfa36cdc5..f352f60cf2a 100644 --- a/source3/rpc_client/rpc_transport.h +++ b/source3/rpc_client/rpc_transport.h @@ -99,5 +99,6 @@ NTSTATUS rpc_transport_sock_init(TALLOC_CTX *mem_ctx, int fd, NTSTATUS rpc_transport_tstream_init(TALLOC_CTX *mem_ctx, struct tstream_context **stream, struct rpc_cli_transport **presult); - +struct tstream_context *rpc_transport_get_tstream( + struct rpc_cli_transport *transport); #endif /* _RPC_CLIENT_RPC_TRANSPORT_H_ */ diff --git a/source3/rpc_client/rpc_transport_tstream.c b/source3/rpc_client/rpc_transport_tstream.c index 3c64d03bb12..02fc3205703 100644 --- a/source3/rpc_client/rpc_transport_tstream.c +++ b/source3/rpc_client/rpc_transport_tstream.c @@ -554,3 +554,11 @@ NTSTATUS rpc_transport_tstream_init(TALLOC_CTX *mem_ctx, *presult = result; return NT_STATUS_OK; } + +struct tstream_context *rpc_transport_get_tstream( + struct rpc_cli_transport *transport) +{ + struct rpc_tstream_state *state = talloc_get_type_abort( + transport->priv, struct rpc_tstream_state); + return state->stream; +}