From 9a831a3963d9784a470b7d3971b54bd9bde3d7c3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 6 Jun 2005 09:59:43 +0000 Subject: r7328: fix GetPrinterData and SetPrinterData, with zero length subcontexts metze (This used to be commit 73d597bacf83492ed3da2307dd6785548b903b39) --- source4/torture/rpc/spoolss.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source4/torture/rpc/spoolss.c') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index b9d48a6da4..7f56212b74 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1324,9 +1324,8 @@ static BOOL test_SetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.handle = handle; r.in.value_name = value_name; - r.in.type = 0; - r.in.buffer = data_blob_talloc(mem_ctx, "dog", 4); - r.in.real_len = 4; + r.in.type = SPOOLSS_PRINTER_DATA_TYPE_STRING; + r.in.data.string = "dog"; printf("Testing SetPrinterData\n"); @@ -1337,6 +1336,10 @@ static BOOL test_SetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } + if (!test_GetPrinterData(p, mem_ctx, handle, value_name)) { + return False; + } + if (!test_DeletePrinterData(p, mem_ctx, handle, value_name)) { return False; } @@ -1828,7 +1831,7 @@ BOOL torture_rpc_spoolss(void) ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "Architecture"); - /*ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "DefaultSpoolDirectory");*/ + ret &= test_GetPrinterData(ctx->p, ctx, &ctx->server_handle, "DefaultSpoolDirectory"); ret &= test_EnumPorts(ctx); -- cgit