Move rpc_pipe_open_internal to srv_pipe_hnd.c
authorVolker Lendecke <vl@samba.org>
Sun, 1 Feb 2009 12:01:54 +0000 (13:01 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 1 Feb 2009 13:34:23 +0000 (14:34 +0100)
This is a smbd-only function

source3/rpc_client/cli_pipe.c
source3/rpc_server/srv_pipe_hnd.c

index cee5d1cfc83f203d2a72c10f79653dbc3d0358dd..0aaec05f67c1da1e5fc86e457332f7f7c2f5c128 100644 (file)
@@ -4117,40 +4117,3 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
 
        return NT_STATUS_OK;
 }
-
-/**
- * Create a new RPC client context which uses a local dispatch function.
- */
-NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *abstract_syntax, 
-                               NTSTATUS (*dispatch) (struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r),
-                               struct auth_serversupplied_info *serversupplied_info,
-                               struct rpc_pipe_client **presult)
-{
-       struct rpc_pipe_client *result;
-
-       result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client);
-       if (result == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       result->abstract_syntax = *abstract_syntax;
-       result->transfer_syntax = ndr_transfer_syntax;
-       result->dispatch = dispatch;
-
-       result->pipes_struct = TALLOC_ZERO_P(mem_ctx, pipes_struct);
-       if (result->pipes_struct == NULL) {
-               TALLOC_FREE(result);
-               return NT_STATUS_NO_MEMORY;
-       }
-       result->pipes_struct->mem_ctx = mem_ctx;
-       result->pipes_struct->server_info = serversupplied_info;
-       result->pipes_struct->pipe_bound = true;
-
-       result->max_xmit_frag = -1;
-       result->max_recv_frag = -1;
-
-       *presult = result;
-       return NT_STATUS_OK;
-}
-
-
index a20a98564b7b3a153f08eb3ac768cd65660659b6..49049f8d55e9857ce291ff2de2f0e1adc0bd31fa 100644 (file)
@@ -1303,3 +1303,40 @@ NTSTATUS np_read_recv(struct async_req *req, ssize_t *nread,
        *is_data_outstanding = state->is_data_outstanding;
        return NT_STATUS_OK;
 }
+
+/**
+ * Create a new RPC client context which uses a local dispatch function.
+ */
+NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
+                               const struct ndr_syntax_id *abstract_syntax,
+                               NTSTATUS (*dispatch) (struct rpc_pipe_client *cli,
+                                                     TALLOC_CTX *mem_ctx,
+                                                     const struct ndr_interface_table *table,
+                                                     uint32_t opnum, void *r),
+                               struct auth_serversupplied_info *serversupplied_info,
+                               struct rpc_pipe_client **presult)
+{
+       struct rpc_pipe_client *result;
+
+       result = TALLOC_ZERO_P(mem_ctx, struct rpc_pipe_client);
+       if (result == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
+
+       result->abstract_syntax = *abstract_syntax;
+       result->transfer_syntax = ndr_transfer_syntax;
+       result->dispatch = dispatch;
+
+       result->pipes_struct = make_internal_rpc_pipe_p(
+               result, abstract_syntax, "", serversupplied_info);
+       if (result->pipes_struct == NULL) {
+               TALLOC_FREE(result);
+               return NT_STATUS_NO_MEMORY;
+       }
+
+       result->max_xmit_frag = -1;
+       result->max_recv_frag = -1;
+
+       *presult = result;
+       return NT_STATUS_OK;
+}