summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clireadwrite.c
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2004-10-14 03:19:57 +0000
committerRichard Sharpe <sharpe@samba.org>2004-10-14 03:19:57 +0000
commit4ada8a709ed15f399ffcb657daf6a838e07a77f3 (patch)
tree80db3c339009660182ee985a7600b46fb5a451e2 /source/libsmb/clireadwrite.c
parentee20ef73e3e48aae3257d3471def3d80f013d90a (diff)
downloadsamba-4ada8a709ed15f399ffcb657daf6a838e07a77f3.tar.gz
samba-4ada8a709ed15f399ffcb657daf6a838e07a77f3.tar.xz
samba-4ada8a709ed15f399ffcb657daf6a838e07a77f3.zip
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.
Diffstat (limited to 'source/libsmb/clireadwrite.c')
-rw-r--r--source/libsmb/clireadwrite.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/libsmb/clireadwrite.c b/source/libsmb/clireadwrite.c
index 3f14e530943..d1a23d36c8b 100644
--- a/source/libsmb/clireadwrite.c
+++ b/source/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))