summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-10 12:34:20 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-10 14:07:56 +0100
commit9579a6f193f570e4ce2af80f4aac7c2f25ae5b22 (patch)
treef23951e02beae9168966f7edaeade25ba036031e /source3/client
parentc2993f74af4e17790f8afbf16ba1c6884afa4ad4 (diff)
downloadsamba-9579a6f193f570e4ce2af80f4aac7c2f25ae5b22.tar.gz
samba-9579a6f193f570e4ce2af80f4aac7c2f25ae5b22.tar.bz2
samba-9579a6f193f570e4ce2af80f4aac7c2f25ae5b22.zip
s3:libsmb: add an option to cli_push to let the caller provide the buffers
metze
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c10
1 files changed, 6 insertions, 4 deletions
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));
}