summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-06 12:22:35 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 14:59:21 +0100
commit8153916f4aad1482351719ed2f1d91d48fe89197 (patch)
tree750015d3bf1ab55b6692d36b05fece712ecb3313
parent22e2f220be4ac05aead7ba7a893904299c5bbfd8 (diff)
downloadsamba-8153916f4aad1482351719ed2f1d91d48fe89197.tar.gz
samba-8153916f4aad1482351719ed2f1d91d48fe89197.tar.bz2
samba-8153916f4aad1482351719ed2f1d91d48fe89197.zip
s4-smbtorture: fix test_GetPrinter.
Guenther
-rw-r--r--source4/torture/rpc/spoolss.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 7a64d9abcb..a2965ad05f 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -605,12 +605,14 @@ static bool test_GetPrinter(struct torture_context *tctx,
struct spoolss_GetPrinter r;
uint16_t levels[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
int i;
+ uint32_t needed;
for (i=0;i<ARRAY_SIZE(levels);i++) {
r.in.handle = handle;
r.in.level = levels[i];
r.in.buffer = NULL;
r.in.offered = 0;
+ r.out.needed = &needed;
torture_comment(tctx, "Testing GetPrinter level %u\n", r.in.level);
@@ -618,10 +620,10 @@ static bool test_GetPrinter(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "GetPrinter failed");
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
- DATA_BLOB blob = data_blob_talloc(tctx, NULL, r.out.needed);
+ DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed);
data_blob_clear(&blob);
r.in.buffer = &blob;
- r.in.offered = r.out.needed;
+ r.in.offered = needed;
status = dcerpc_spoolss_GetPrinter(p, tctx, &r);
}