summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-06 12:32:57 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 14:59:21 +0100
commit0d4dbe6012ee6f15256de14f8d4d6b32eb4ca313 (patch)
tree6f56c8f07b22d3392a9177d47f27029ef6ad2344 /source4/torture/rpc
parentb970eb791cdf8893881bab3c113fdd5f2ff9866e (diff)
downloadsamba-0d4dbe6012ee6f15256de14f8d4d6b32eb4ca313.tar.gz
samba-0d4dbe6012ee6f15256de14f8d4d6b32eb4ca313.tar.bz2
samba-0d4dbe6012ee6f15256de14f8d4d6b32eb4ca313.zip
s4-smbtorture: fix test_GetPrinterDriverDirectory.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-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 a2965ad05f..3c5fcabbd2 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -191,6 +191,7 @@ static bool test_GetPrinterDriverDirectory(struct torture_context *tctx,
}
};
int i;
+ uint32_t needed;
for (i=0;i<ARRAY_SIZE(levels);i++) {
int level = levels[i].level;
@@ -201,6 +202,7 @@ static bool test_GetPrinterDriverDirectory(struct torture_context *tctx,
r.in.level = level;
r.in.buffer = NULL;
r.in.offered = 0;
+ r.out.needed = &needed;
torture_comment(tctx, "Testing GetPrinterDriverDirectory level %u\n", r.in.level);
@@ -210,10 +212,10 @@ static bool test_GetPrinterDriverDirectory(struct torture_context *tctx,
torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER,
"GetPrinterDriverDirectory unexpected return code");
- blob = data_blob_talloc(ctx, NULL, r.out.needed);
+ blob = data_blob_talloc(ctx, NULL, needed);
data_blob_clear(&blob);
r.in.buffer = &blob;
- r.in.offered = r.out.needed;
+ r.in.offered = needed;
status = dcerpc_spoolss_GetPrinterDriverDirectory(p, ctx, &r);
torture_assert_ntstatus_ok(tctx, status, "dcerpc_spoolss_GetPrinterDriverDirectory failed");