summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-18 01:41:46 +0100
committerGünther Deschner <gd@samba.org>2010-02-18 01:48:45 +0100
commita1ba72f84c6256e2b6cacfe4d6016ba2c1b832d1 (patch)
tree286d4345c69f5d6b1f256683261636ee2f8e3149 /source4/torture
parent57847c2fee1a19c388ab84f5c629212f70cde62d (diff)
downloadsamba-a1ba72f84c6256e2b6cacfe4d6016ba2c1b832d1.tar.gz
samba-a1ba72f84c6256e2b6cacfe4d6016ba2c1b832d1.tar.bz2
samba-a1ba72f84c6256e2b6cacfe4d6016ba2c1b832d1.zip
s4-smbtorture: simplify test_PrinterInfo_DevMode a bit.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 82469e9ef3..f57ffe527d 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -2007,16 +2007,13 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
const char *name)
{
union spoolss_PrinterInfo info;
- struct spoolss_SetPrinterInfo8 info8;
- struct spoolss_SetPrinterInfoCtr info_ctr;
- struct spoolss_DevmodeContainer devmode_ctr;
- struct sec_desc_buf secdesc_ctr;
struct spoolss_DeviceMode *devmode;
bool ret = true;
/* save original devmode */
- torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 8, &info), "");
+ torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 8, &info),
+ "failed to get initial global devicemode");
devmode = info.info8.devmode;
@@ -2026,18 +2023,8 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
/* restore original devmode */
- ZERO_STRUCT(devmode_ctr);
- ZERO_STRUCT(secdesc_ctr);
-
- info8.devmode_ptr = 0;
-
- info_ctr.level = 8;
- info_ctr.info.info8 = &info8;
-
- devmode_ctr.devmode = devmode;
-
- torture_assert(tctx,
- test_SetPrinter(tctx, p, handle, &info_ctr, &devmode_ctr, &secdesc_ctr, 0), "");
+ torture_assert(tctx, test_devmode_set_level(tctx, p, handle, 8, devmode),
+ "failed to restore initial global device mode");
return ret;
}