From 26c106e0838db54aafddf1e0f7e4781510dbc582 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 14 Oct 2004 03:19:57 +0000 Subject: r2959: If we want to support writes >= 65536 with cli_write, then it had better return a size_t, not an ssize_t, and we had better left shift the upper part of the write count, not right shift it. (This used to be commit 3eb33fbc64415600d62ff7b1f2edd67d2dac05b4) --- source3/libsmb/clireadwrite.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/libsmb/clireadwrite.c') diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 3f14e53094..d1a23d36c8 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -318,9 +318,9 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, 0x0008 start of message mode named pipe protocol ****************************************************************************/ -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - const char *buf, off_t offset, size_t size) +size_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + const char *buf, off_t offset, size_t size) { int bwritten = 0; int issued = 0; @@ -358,7 +358,7 @@ ssize_t cli_write(struct cli_state *cli, break; bwritten += SVAL(cli->inbuf, smb_vwv2); - bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))>>16); + bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))<<16); } while (received < issued && cli_receive_smb(cli)) -- cgit