s3-rpc_server: Migrate init_pipe_handles() to new syntax.
authorAndreas Schneider <asn@samba.org>
Tue, 31 May 2011 08:53:55 +0000 (10:53 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 1 Jun 2011 10:02:15 +0000 (12:02 +0200)
source3/rpc_server/rpc_handles.c

index 493149b2c3bbe98e3f2c47e35c7baaa5a375256b..32e98f3644ffdebda15ddec25c0b985683b909ca 100644 (file)
@@ -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;
                }
        }