From 6b0f82eeab04e59657231b73fd94d33cffaadc76 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 31 May 2011 10:53:55 +0200 Subject: s3-rpc_server: Migrate init_pipe_handles() to new syntax. --- source3/rpc_server/rpc_handles.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/source3/rpc_server/rpc_handles.c b/source3/rpc_server/rpc_handles.c index 493149b2c3..32e98f3644 100644 --- a/source3/rpc_server/rpc_handles.c +++ b/source3/rpc_server/rpc_handles.c @@ -84,15 +84,28 @@ bool init_pipe_handles(struct pipes_struct *p, const struct ndr_syntax_id *synta for (plist = get_first_internal_pipe(); plist; plist = get_next_internal_pipe(plist)) { - if (ndr_syntax_id_equal(syntax, &plist->syntax)) { - break; + struct pipe_rpc_fns *p_ctx; + bool stop = false; + + for (p_ctx = plist->contexts; + p_ctx != NULL; + p_ctx = p_ctx->next) { + if (ndr_syntax_id_equal(syntax, &p_ctx->syntax)) { + stop = true; + break; + } + if (is_samr_lsa_pipe(&p_ctx->syntax) + && is_samr_lsa_pipe(syntax)) { + /* + * samr and lsa share a handle space (same process + * under Windows?) + */ + stop = true; + break; + } } - if (is_samr_lsa_pipe(&plist->syntax) - && is_samr_lsa_pipe(syntax)) { - /* - * samr and lsa share a handle space (same process - * under Windows?) - */ + + if (stop) { break; } } -- cgit