diff options
author | Günther Deschner <gd@samba.org> | 2009-07-14 14:33:08 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-07-14 22:58:55 +0200 |
commit | b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12 (patch) | |
tree | 7aa6cc63dda6216e56c35682e7c5a1b8b08fd3c3 | |
parent | 036bad61317bc71f59db0e766881dd880253bb52 (diff) | |
download | samba-b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12.tar.gz samba-b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12.tar.bz2 samba-b0cce950ba32be3e2a9f10bf4ee6ba34f6da9c12.zip |
s4-smbtorture: restructure test_OpenPrinter_server in RPC-SPOOLSS a bit.
Guenther
-rw-r--r-- | source4/torture/rpc/spoolss.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 10e18e1531..3cfe020892 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -75,20 +75,22 @@ struct test_spoolss_context { #define COMPARE_STRING_ARRAY(tctx, c,r,e) -static bool test_OpenPrinter_server(struct torture_context *tctx, struct dcerpc_pipe *p, struct test_spoolss_context *ctx) +static bool test_OpenPrinter_server(struct torture_context *tctx, + struct dcerpc_pipe *p, + struct policy_handle *server_handle) { NTSTATUS status; struct spoolss_OpenPrinter op; - op.in.printername = talloc_asprintf(ctx, "\\\\%s", dcerpc_server_name(p)); + op.in.printername = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); op.in.datatype = NULL; op.in.devmode_ctr.devmode= NULL; op.in.access_mask = 0; - op.out.handle = &ctx->server_handle; + op.out.handle = server_handle; torture_comment(tctx, "Testing OpenPrinter(%s)\n", op.in.printername); - status = dcerpc_spoolss_OpenPrinter(p, ctx, &op); + status = dcerpc_spoolss_OpenPrinter(p, tctx, &op); torture_assert_ntstatus_ok(tctx, status, "dcerpc_spoolss_OpenPrinter failed"); torture_assert_werr_ok(tctx, op.out.result, "dcerpc_spoolss_OpenPrinter failed"); @@ -2087,7 +2089,7 @@ bool torture_rpc_spoolss(struct torture_context *torture) ctx = talloc_zero(torture, struct test_spoolss_context); - ret &= test_OpenPrinter_server(torture, p, ctx); + ret &= test_OpenPrinter_server(torture, p, &ctx->server_handle); ret &= test_GetPrinterData(torture, p, &ctx->server_handle, "W3SvcInstalled"); ret &= test_GetPrinterData(torture, p, &ctx->server_handle, "BeepEnabled"); |