From 16cf6ef2b7afaebeaf73cf7aac925fddc7e4f07f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 21 Mar 2008 13:39:48 +0100 Subject: [PATCH] On Solaris, size_t seems to be only 32 bit. Fix bug 5341, thanks a lot to Karoly Vegh for testing it! Volker --- source/libsmb/clireadwrite.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c index 64a6b7b..f292fcb 100644 --- a/source/libsmb/clireadwrite.c +++ b/source/libsmb/clireadwrite.c @@ -175,7 +175,7 @@ struct cli_pull_state { struct cli_state *cli; uint16_t fnum; off_t start_offset; - size_t size; + SMB_OFF_T size; NTSTATUS (*sink)(char *buf, size_t n, void *priv); void *priv; @@ -232,7 +232,7 @@ static void cli_pull_read_done(struct async_req *read_req); struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t fnum, off_t start_offset, - size_t size, size_t window_size, + SMB_OFF_T size, size_t window_size, NTSTATUS (*sink)(char *buf, size_t n, void *priv), void *priv) @@ -284,7 +284,8 @@ struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx, struct cli_state *cli, state->requested = 0; for (i=0; inum_reqs; i++) { - size_t size_left, request_thistime; + SMB_OFF_T size_left; + size_t request_thistime; if (state->requested >= size) { state->num_reqs = i; @@ -376,7 +377,8 @@ static void cli_pull_read_done(struct async_req *read_req) if (state->requested < state->size) { struct async_req *new_req; - size_t size_left, request_thistime; + SMB_OFF_T size_left; + size_t request_thistime; size_left = state->size - state->requested; request_thistime = MIN(size_left, state->chunk_size); @@ -424,7 +426,7 @@ NTSTATUS cli_pull_recv(struct async_req *req, ssize_t *received) } NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum, - off_t start_offset, size_t size, size_t window_size, + off_t start_offset, SMB_OFF_T size, size_t window_size, NTSTATUS (*sink)(char *buf, size_t n, void *priv), void *priv, ssize_t *received) { -- 1.5.3.6