From 8f38cc8df83716b815cb75d6c3b502c13bd0ce8a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 18 Nov 2003 09:19:34 +0000 Subject: cope with no printers returned from EnumPrinters (This used to be commit 8c49669dbec96df365d1866df24a17c1ff2c6cd0) --- source4/torture/rpc/spoolss.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 9009c8e99a..65bc6d519d 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -266,6 +266,11 @@ static BOOL test_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) continue; } + if (!r.out.buffer) { + printf("No printers returned"); + continue; + } + status = pull_spoolss_PrinterInfoArray(r.out.buffer, mem_ctx, r.in.level, r.out.count, &info); if (!NT_STATUS_IS_OK(status)) { printf("EnumPrintersArray parse failed - %s\n", nt_errstr(status)); -- cgit