From 57bfcc3407798e7cc028699a6702293aa6253e67 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Wed, 22 Jul 2009 07:52:59 +0000 Subject: [PATCH] - Added Harry Sintonen's fix for the large write issue. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@26 26594b9e-b914-4e86-b7a1-9402bd427170 --- source_code/GNUmakefile.os4 | 5 ++--- source_code/crypt.c | 4 ++-- source_code/proc.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source_code/GNUmakefile.os4 b/source_code/GNUmakefile.os4 index 471e150..c5f7207 100644 --- a/source_code/GNUmakefile.os4 +++ b/source_code/GNUmakefile.os4 @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.os4,v 1.5 2009-04-14 12:16:11 obarthel Exp $ +# $Id: GNUmakefile.os4,v 1.6 2009-07-22 07:52:59 obarthel Exp $ # # :ts=8 # @@ -40,14 +40,13 @@ WARNINGS = \ -Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ -Wundef -Wbad-function-cast -Wmissing-declarations -CPU = -mcpu=604e -msoft-float OPTIONS = -DNDEBUG OPTIMIZE = -O3 DEBUG = -ggdb ########################################################################### -CFLAGS = -mcrt=clib2 -D__NO_NET_API $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(CPU) $(OPTIONS) \ +CFLAGS = -mcrt=clib2 -D__NO_NET_API $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) \ -I. -I/V/include -I/usr/local/amiga/ppc-amigaos/sys-include -Iinclude -Inetinclude LFLAGS = -nostartfiles -nostdlib -L. diff --git a/source_code/crypt.c b/source_code/crypt.c index 4e2e4f0..06948b4 100644 --- a/source_code/crypt.c +++ b/source_code/crypt.c @@ -1,5 +1,5 @@ /* - * $Id: crypt.c,v 1.1.1.1 2005-05-24 13:22:06 obarthel Exp $ + * $Id: crypt.c,v 1.2 2009-07-22 07:52:59 obarthel Exp $ * * :ts=8 * @@ -440,7 +440,7 @@ smb_encrypt (unsigned char *passwd, unsigned char *c8, unsigned char *p24) memset (p21, '\0', sizeof(p21)); memset (p14, '\0', sizeof(p14)); - len = strlen(passwd); + len = strlen((const char *)passwd); if(len > (int)sizeof(p14)-1) len = sizeof(p14)-1; diff --git a/source_code/proc.c b/source_code/proc.c index 4055371..ff7c657 100644 --- a/source_code/proc.c +++ b/source_code/proc.c @@ -1,5 +1,5 @@ /* - * $Id: proc.c,v 1.8 2009-04-17 11:09:41 obarthel Exp $ + * $Id: proc.c,v 1.9 2009-07-22 07:52:59 obarthel Exp $ * * :ts=8 * @@ -806,7 +806,7 @@ smb_proc_write_raw (struct smb_server *server, struct smb_dirent *finfo, off_t o else len = count - len; /* transfer the larger part using the second packet */ - p = smb_setup_header_exclusive (server, SMBwritebraw, 11, len); + p = smb_setup_header_exclusive (server, SMBwritebraw, server->protocol > PROTOCOL_COREPLUS ? 12 : 11, len); WSET (buf, smb_vwv0, finfo->fileid); DSET (buf, smb_vwv1, count);