diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-02-14 13:37:37 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-02-14 13:37:37 +1100 |
commit | 501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095 (patch) | |
tree | ce7e7914cf366f3abd52b07d5244a558de5eb28b /source4/torture/rpc/spoolss.c | |
parent | 039f85835d60ae48c4176891598cf24e18d0cd0a (diff) | |
parent | 411776505cea3932a196e8439a8198b4e419d901 (diff) | |
download | samba-501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095.tar.gz samba-501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095.tar.bz2 samba-501e8fbc3dd49e4e1b9ccc08f830af4f8c1a1095.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 309cf408e01c36e2a12ed2d1462f2bbe407d4597)
Diffstat (limited to 'source4/torture/rpc/spoolss.c')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 23b4aad30b..4a6ff480c4 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1178,16 +1178,23 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip NTSTATUS status; struct spoolss_EnumPrinterData r; + ZERO_STRUCT(r); r.in.handle = handle; r.in.enum_index = 0; do { - uint32_t data_size; - - r.in.value_offered = 0; - data_size = 0; - r.in.data_size = &data_size; - r.out.data_size = &data_size; + uint32_t value_size = 0; + uint32_t data_size = 0; + uint32_t printerdata_type = 0; + DATA_BLOB data = data_blob(NULL,0); + + r.in.value_offered = value_size; + r.out.value_needed = &value_size; + r.in.data_offered = data_size; + r.out.data_needed = &data_size; + + r.out.printerdata_type = &printerdata_type; + r.out.buffer = &data; torture_comment(tctx, "Testing EnumPrinterData\n"); @@ -1195,7 +1202,8 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip torture_assert_ntstatus_ok(tctx, status, "EnumPrinterData failed"); - r.in.value_offered = r.out.value_needed; + r.in.value_offered = value_size; + r.in.data_offered = data_size; status = dcerpc_spoolss_EnumPrinterData(p, tctx, &r); |