summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/spoolss.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-06 13:09:22 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 14:59:21 +0100
commit99398e8768f308f01b3298bfbc3bb783f6ea8c2f (patch)
tree7a055dfe1a6eb344998c2543c2758c4c1d03f6d7 /source4/torture/rpc/spoolss.c
parentd400de2ffa53bebe13cba0d2d3c18dcc05bc37bd (diff)
downloadsamba-99398e8768f308f01b3298bfbc3bb783f6ea8c2f.tar.gz
samba-99398e8768f308f01b3298bfbc3bb783f6ea8c2f.tar.bz2
samba-99398e8768f308f01b3298bfbc3bb783f6ea8c2f.zip
s4-smbtorture: fix test_GetForm.
Guenther
Diffstat (limited to 'source4/torture/rpc/spoolss.c')
-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 707f3496b6..70c4acb025 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -663,12 +663,14 @@ static bool test_GetForm(struct torture_context *tctx,
{
NTSTATUS status;
struct spoolss_GetForm r;
+ uint32_t needed;
r.in.handle = handle;
r.in.form_name = form_name;
r.in.level = 1;
r.in.buffer = NULL;
r.in.offered = 0;
+ r.out.needed = &needed;
torture_comment(tctx, "Testing GetForm\n");
@@ -676,10 +678,10 @@ static bool test_GetForm(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "GetForm 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_GetForm(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "GetForm failed");