summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-04-17 17:14:20 +0200
committerGünther Deschner <gd@samba.org>2009-04-17 17:23:59 +0200
commit81253ec14623ed480905433e5bf5df7982cfbfa4 (patch)
treed17ec4893dd34ac7942db280daa07a13fbd99b52 /source4
parentd43a49d4497f882c8f4203a4b96b88a83ad85acb (diff)
downloadsamba-81253ec14623ed480905433e5bf5df7982cfbfa4.tar.gz
samba-81253ec14623ed480905433e5bf5df7982cfbfa4.tar.bz2
samba-81253ec14623ed480905433e5bf5df7982cfbfa4.zip
s4-smbtorture: Fix RPC-SPOOLSS-WIN for printers with a lot of jobs in the queue.
Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss_win.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c
index 42b6929557..719d8e26d2 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;