Revert "s3: Do not reference ndr_table_<pipe> in the cli_ routines directly"
[kai/samba-autobuild/.git] / source3 / winbindd / winbindd_dual_ndr.c
index 3546a78fd61b7e1e41d89d213444c2581af74909..8a23ce48e041f01f259c4cb954f043d0ec7fc02b 100644 (file)
@@ -51,8 +51,7 @@ static void wb_ndr_dispatch_done(struct tevent_req *subreq);
 static struct tevent_req *wb_ndr_dispatch_send(TALLOC_CTX *mem_ctx,
                                               struct tevent_context *ev,
                                               struct rpc_pipe_client *cli,
-                                              const char *interface,
-                                              uint32_t interface_version,
+                                              const struct ndr_interface_table *table,
                                               uint32_t opnum,
                                               void *r)
 {
@@ -70,7 +69,7 @@ static struct tevent_req *wb_ndr_dispatch_send(TALLOC_CTX *mem_ctx,
        }
 
        state->r = r;
-       state->call = &ndr_table_wbint.calls[opnum];
+       state->call = &table->calls[opnum];
        state->transport = transport;
        state->opnum = opnum;
 
@@ -168,8 +167,7 @@ static NTSTATUS wb_ndr_dispatch_recv(struct tevent_req *req,
 
 static NTSTATUS wb_ndr_dispatch(struct rpc_pipe_client *cli,
                                TALLOC_CTX *mem_ctx,
-                               const char *interface,
-                               uint32_t interface_version,
+                               const struct ndr_interface_table *table,
                                uint32_t opnum, void *r)
 {
        TALLOC_CTX *frame = talloc_stackframe();
@@ -183,8 +181,7 @@ static NTSTATUS wb_ndr_dispatch(struct rpc_pipe_client *cli,
                goto fail;
        }
 
-       req = wb_ndr_dispatch_send(frame, ev, cli, interface,
-                                  interface_version, opnum, r);
+       req = wb_ndr_dispatch_send(frame, ev, cli, table, opnum, r);
        if (req == NULL) {
                status = NT_STATUS_NO_MEMORY;
                goto fail;
@@ -267,7 +264,6 @@ enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
 
        ZERO_STRUCT(p);
        p.mem_ctx = talloc_stackframe();
-       p.interface = &ndr_table_wbint;
        p.in_data.data.buffer_size = state->request->extra_len;
        p.in_data.data.data_p = state->request->extra_data.data;
        prs_init(&p.out_data.rdata, 0, state->mem_ctx, false);
@@ -293,7 +289,7 @@ enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
  * Just a dummy to make srv_wbint.c happy
  */
 NTSTATUS rpc_srv_register(int version, const char *clnt, const char *srv,
-                         const char *interface, uint32_t interface_version,
+                         const struct ndr_interface_table *iface,
                          const struct api_struct *cmds, int size)
 {
        return NT_STATUS_OK;