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/client/client.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index aaa9e35d96..67a2458a94 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -220,7 +220,9 @@ struct push_state { SMB_OFF_T nread; }; -static size_t push_source(uint8_t *buf, size_t n, void *priv) +static size_t push_source(uint8_t *inbuf, size_t n, + const uint8_t **outbuf, + void *priv) { struct push_state *state = (struct push_state *)priv; int result; @@ -229,7 +231,7 @@ static size_t push_source(uint8_t *buf, size_t n, void *priv) return 0; } - result = readfile(buf, n, state->f); + result = readfile(inbuf, n, state->f); state->nread += result; return result; } @@ -1681,8 +1683,8 @@ static int do_put(const char *rname, const char *lname, bool reput) state.f = f; state.nread = 0; - status = cli_push(targetcli, fnum, 0, 0, io_bufsize, push_source, - &state); + status = cli_push(targetcli, fnum, 0, 0, io_bufsize, + false, push_source, &state); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, "cli_push returned %s\n", nt_errstr(status)); } -- cgit