svn commit: samba r2959 - in branches/SAMBA_3_0/source/libsmb: .
sharpe at samba.org
sharpe at samba.org
Thu Oct 14 03:19:58 GMT 2004
Author: sharpe
Date: 2004-10-14 03:19:57 +0000 (Thu, 14 Oct 2004)
New Revision: 2959
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_3_0/source/libsmb&rev=2959&nolog=1
Log:
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.
Modified:
branches/SAMBA_3_0/source/libsmb/clireadwrite.c
Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/clireadwrite.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/clireadwrite.c 2004-10-13 23:33:17 UTC (rev 2958)
+++ branches/SAMBA_3_0/source/libsmb/clireadwrite.c 2004-10-14 03:19:57 UTC (rev 2959)
@@ -318,9 +318,9 @@
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 @@
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))
More information about the samba-cvs
mailing list