From 886c028e44a31c52f6595343f55236e27a8d0b40 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 13 Feb 2009 17:18:32 +0100 Subject: s4-smbtorture: fix test_PausePrinter and test_ResumePrinter. Guenther --- source4/torture/rpc/spoolss.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'source4') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 3e72bdeb34..480f33e1a1 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1087,12 +1087,20 @@ static bool test_PausePrinter(struct torture_context *tctx, { NTSTATUS status; struct spoolss_SetPrinter r; + struct spoolss_SetPrinterInfoCtr info_ctr; + struct spoolss_DevmodeContainer devmode_ctr; + struct sec_desc_buf secdesc_ctr; + + info_ctr.level = 0; + info_ctr.info.info0 = NULL; + + ZERO_STRUCT(devmode_ctr); + ZERO_STRUCT(secdesc_ctr); r.in.handle = handle; - r.in.level = 0; - r.in.info.info1 = NULL; - r.in.devmode_ctr.devmode= NULL; - r.in.secdesc_ctr.sd = NULL; + r.in.info_ctr = &info_ctr; + r.in.devmode_ctr = &devmode_ctr; + r.in.secdesc_ctr = &secdesc_ctr; r.in.command = SPOOLSS_PRINTER_CONTROL_PAUSE; torture_comment(tctx, "Testing SetPrinter: SPOOLSS_PRINTER_CONTROL_PAUSE\n"); @@ -1112,12 +1120,20 @@ static bool test_ResumePrinter(struct torture_context *tctx, { NTSTATUS status; struct spoolss_SetPrinter r; + struct spoolss_SetPrinterInfoCtr info_ctr; + struct spoolss_DevmodeContainer devmode_ctr; + struct sec_desc_buf secdesc_ctr; + + info_ctr.level = 0; + info_ctr.info.info0 = NULL; + + ZERO_STRUCT(devmode_ctr); + ZERO_STRUCT(secdesc_ctr); r.in.handle = handle; - r.in.level = 0; - r.in.info.info1 = NULL; - r.in.devmode_ctr.devmode= NULL; - r.in.secdesc_ctr.sd = NULL; + r.in.info_ctr = &info_ctr; + r.in.devmode_ctr = &devmode_ctr; + r.in.secdesc_ctr = &secdesc_ctr; r.in.command = SPOOLSS_PRINTER_CONTROL_RESUME; torture_comment(tctx, "Testing SetPrinter: SPOOLSS_PRINTER_CONTROL_RESUME\n"); -- cgit