summaryrefslogtreecommitdiffstats
path: root/source3/client
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-12 09:02:02 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-12 11:03:50 +0100
commit2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705 (patch)
tree1bd64fc48aa1c7e71befa877458a467d45e4bbaf /source3/client
parenta0a9c5d1709e81a1503c7326147b3d77ab4328c9 (diff)
downloadsamba-2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705.tar.gz
samba-2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705.tar.xz
samba-2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705.zip
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
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 67a2458a94c..aaa9e35d968 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));
}