From 2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 12 Mar 2009 09:02:02 +0100 Subject: Revert "s3:libsmb: add an option to cli_push to let the caller provide the buffers" This reverts commit 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22. It's confusing to have a boolean to alter the behavior of cli_push and as the new feature isn't used yet I revert it. We can readd a extra function later. metze --- source3/client/client.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index 67a2458a94..aaa9e35d96 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -220,9 +220,7 @@ struct push_state { SMB_OFF_T nread; }; -static size_t push_source(uint8_t *inbuf, size_t n, - const uint8_t **outbuf, - void *priv) +static size_t push_source(uint8_t *buf, size_t n, void *priv) { struct push_state *state = (struct push_state *)priv; int result; @@ -231,7 +229,7 @@ static size_t push_source(uint8_t *inbuf, size_t n, return 0; } - result = readfile(inbuf, n, state->f); + result = readfile(buf, n, state->f); state->nread += result; return result; } @@ -1683,8 +1681,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, - false, push_source, &state); + status = cli_push(targetcli, fnum, 0, 0, io_bufsize, push_source, + &state); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, "cli_push returned %s\n", nt_errstr(status)); } -- cgit