diff options
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 7 | ||||
-rw-r--r-- | source4/librpc/rpc/rpc_spoolss.c | 16 |
2 files changed, 12 insertions, 11 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 6e6436887b..aa8b8520f3 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -814,3 +814,10 @@ failed: } +/* + a useful function for retrieving the server name we connected to +*/ +const char *dcerpc_server_name(struct dcerpc_pipe *p) +{ + return p->tree->session->transport->called.name; +} diff --git a/source4/librpc/rpc/rpc_spoolss.c b/source4/librpc/rpc/rpc_spoolss.c index 366072c42c..e2d3a1ae35 100644 --- a/source4/librpc/rpc/rpc_spoolss.c +++ b/source4/librpc/rpc/rpc_spoolss.c @@ -11,18 +11,12 @@ NTSTATUS dcerpc_spoolss_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r); } -NTSTATUS dcerpc_spoolss_01(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_01 *r) +NTSTATUS dcerpc_spoolss_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_OpenPrinter *r) { - NTSTATUS status; - status = dcerpc_ndr_request(p, DCERPC_SPOOLSS_01, mem_ctx, - (ndr_push_fn_t) ndr_push_spoolss_01, - (ndr_pull_fn_t) ndr_pull_spoolss_01, - r); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - return r->out.result; + return dcerpc_ndr_request(p, DCERPC_SPOOLSS_OPENPRINTER, mem_ctx, + (ndr_push_fn_t) ndr_push_spoolss_OpenPrinter, + (ndr_pull_fn_t) ndr_pull_spoolss_OpenPrinter, + r); } NTSTATUS dcerpc_spoolss_02(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct spoolss_02 *r) |