diff options
author | Günther Deschner <gd@samba.org> | 2009-02-06 12:25:47 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-06 14:59:21 +0100 |
commit | b970eb791cdf8893881bab3c113fdd5f2ff9866e (patch) | |
tree | 3ebee63782452422c328b61927aac2b86e0b307b /source4/torture/rpc/samba3rpc.c | |
parent | 8153916f4aad1482351719ed2f1d91d48fe89197 (diff) | |
download | samba-b970eb791cdf8893881bab3c113fdd5f2ff9866e.tar.gz samba-b970eb791cdf8893881bab3c113fdd5f2ff9866e.tar.bz2 samba-b970eb791cdf8893881bab3c113fdd5f2ff9866e.zip |
s4-smbtorture: fix test_GetPrinter.
Guenther
Diffstat (limited to 'source4/torture/rpc/samba3rpc.c')
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 5b493db813..d4bcb4919c 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -2668,6 +2668,7 @@ static NTSTATUS getprinterinfo(TALLOC_CTX *ctx, struct dcerpc_pipe *pipe, struct spoolss_GetPrinter r; DATA_BLOB blob; NTSTATUS status; + uint32_t needed; mem_ctx = talloc_new(ctx); if (mem_ctx == NULL) { @@ -2678,6 +2679,7 @@ static NTSTATUS getprinterinfo(TALLOC_CTX *ctx, struct dcerpc_pipe *pipe, r.in.level = level; r.in.buffer = NULL; r.in.offered = 0; + r.out.needed = &needed; status = dcerpc_spoolss_GetPrinter(pipe, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { @@ -2697,14 +2699,14 @@ static NTSTATUS getprinterinfo(TALLOC_CTX *ctx, struct dcerpc_pipe *pipe, r.in.handle = handle; r.in.level = level; - blob = data_blob_talloc(mem_ctx, NULL, r.out.needed); + blob = data_blob_talloc(mem_ctx, NULL, needed); if (blob.data == NULL) { talloc_free(mem_ctx); return NT_STATUS_NO_MEMORY; } memset(blob.data, 0, blob.length); r.in.buffer = &blob; - r.in.offered = r.out.needed; + r.in.offered = needed; status = dcerpc_spoolss_GetPrinter(pipe, mem_ctx, &r); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) { |