From 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 10 Mar 2009 12:34:20 +0100 Subject: s3:libsmb: add an option to cli_push to let the caller provide the buffers metze --- source3/torture/torture.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/torture') diff --git a/source3/torture/torture.c b/source3/torture/torture.c index db89b05603..a563557d5f 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -5004,7 +5004,9 @@ static bool run_chain1(int dummy) return True; } -static size_t null_source(uint8_t *buf, size_t n, void *priv) +static size_t null_source(uint8_t *inbuf, size_t n, + const uint8_t *outbuf, + void *priv) { size_t *to_pull = (size_t *)priv; size_t thistime = *to_pull; @@ -5014,7 +5016,7 @@ static size_t null_source(uint8_t *buf, size_t n, void *priv) return 0; } - memset(buf, 0, thistime); + memset(inbuf, 0, thistime); *to_pull -= thistime; return thistime; } @@ -5057,7 +5059,7 @@ static bool run_windows_write(int dummy) } status = cli_push(cli1, fnum, 0, i * torture_blocksize, torture_blocksize, - null_source, &to_pull); + false, null_source, &to_pull); if (!NT_STATUS_IS_OK(status)) { printf("cli_push returned: %s\n", nt_errstr(status)); goto fail; -- cgit