From 81253ec14623ed480905433e5bf5df7982cfbfa4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 17 Apr 2009 17:14:20 +0200 Subject: [PATCH] s4-smbtorture: Fix RPC-SPOOLSS-WIN for printers with a lot of jobs in the queue. Guenther --- source4/torture/rpc/spoolss_win.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c index 42b69295574..719d8e26d2a 100644 --- a/source4/torture/rpc/spoolss_win.c +++ b/source4/torture/rpc/spoolss_win.c @@ -290,6 +290,13 @@ static bool test_EnumJobs(struct torture_context *tctx, status = dcerpc_spoolss_EnumJobs(p, tctx, &ej); torture_assert_ntstatus_ok(tctx, status, "EnumJobs failed"); + if (W_ERROR_EQUAL(ej.out.result, WERR_INSUFFICIENT_BUFFER)) { + blob = data_blob_talloc_zero(tctx, needed); + ej.in.offered = needed; + ej.in.buffer = &blob; + status = dcerpc_spoolss_EnumJobs(p, tctx, &ej); + torture_assert_ntstatus_ok(tctx, status, "EnumJobs failed"); + } torture_assert_werr_ok(tctx, ej.out.result, "EnumJobs failed"); return true; -- 2.11.4.GIT