summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-10 12:32:48 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-10 12:46:16 +0100
commitc2993f74af4e17790f8afbf16ba1c6884afa4ad4 (patch)
tree3bf050f748b4b0625717fb2b19e2afd348744b9b
parent7fc8086e11497c96be72859a510f72cb3c4104d5 (diff)
downloadsamba-c2993f74af4e17790f8afbf16ba1c6884afa4ad4.tar.gz
samba-c2993f74af4e17790f8afbf16ba1c6884afa4ad4.tar.bz2
samba-c2993f74af4e17790f8afbf16ba1c6884afa4ad4.zip
s3:libsmb: only treat a return 0 as end of file
metze
-rw-r--r--source3/libsmb/clireadwrite.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 764ef631f2..f2f447b4c9 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -971,10 +971,8 @@ static bool cli_push_write_setup(struct async_req *req,
substate->size = state->source(substate->buf,
state->chunk_size,
state->priv);
- if (substate->size < state->chunk_size) {
- state->eof = true;
- }
if (substate->size == 0) {
+ state->eof = true;
/* nothing to send */
talloc_free(substate);
return true;
@@ -1051,7 +1049,6 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
}
if (state->eof) {
- state->num_reqs = i+1;
break;
}
}