summaryrefslogtreecommitdiffstats
path: root/source3/smbd/blocking.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-04-11 19:44:54 +0000
committerJeremy Allison <jra@samba.org>2000-04-11 19:44:54 +0000
commitf6be38cae223f1ad3f4ecc5b81d14c44d92f58ba (patch)
treefdfba0ada6fb79f89c27ace70eea7913e9d97915 /source3/smbd/blocking.c
parentca085145a9392c229b483ee24c1d566a23335fb3 (diff)
downloadsamba-f6be38cae223f1ad3f4ecc5b81d14c44d92f58ba.tar.gz
samba-f6be38cae223f1ad3f4ecc5b81d14c44d92f58ba.tar.xz
samba-f6be38cae223f1ad3f4ecc5b81d14c44d92f58ba.zip
include/byteorder.h: ALIGN4/ALIGN2 macros.
include/includes.h: Added SMB_BIG_UINT_BITS. lib/util.c: Removed align2/align4 - use macros. libsmb/namequery.c: Use ALIGN2. locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Needed to move to hiding POSIX locks at a lower layer. nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros. smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Jeremy. (This used to be commit 491eea8a20bf80d426625479326211dc975857a6)
Diffstat (limited to 'source3/smbd/blocking.c')
-rw-r--r--source3/smbd/blocking.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index ea8d2fd053a..ddf7de3f5be 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -193,7 +193,7 @@ static void reply_lockingX_error(blocking_lock_record *blr, int eclass, int32 ec
files_struct *fsp = blr->fsp;
connection_struct *conn = conn_find(SVAL(inbuf,smb_tid));
uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
- SMB_OFF_T count = (SMB_OFF_T) 0, offset = (SMB_OFF_T) 0;
+ SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT) 0;
unsigned char locktype = CVAL(inbuf,smb_vwv3);
BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
@@ -217,7 +217,7 @@ static void reply_lockingX_error(blocking_lock_record *blr, int eclass, int32 ec
uint32 dummy2;
BOOL err;
- count = get_lock_count( data, i, large_file_format, &err);
+ count = get_lock_count( data, i, large_file_format);
offset = get_lock_offset( data, i, large_file_format, &err);
/*
@@ -278,7 +278,7 @@ static BOOL process_lockread(blocking_lock_record *blr)
numtoread = MIN(BUFFER_SIZE-outsize,numtoread);
data = smb_buf(outbuf) + 3;
- if(!do_lock( fsp, conn, numtoread, startpos, READ_LOCK, &eclass, &ecode)) {
+ if(!do_lock( fsp, conn, (SMB_BIG_UINT)numtoread, (SMB_BIG_UINT)startpos, READ_LOCK, &eclass, &ecode)) {
if((errno != EACCES) && (errno != EAGAIN)) {
/*
* We have other than a "can't get lock" POSIX
@@ -341,7 +341,7 @@ static BOOL process_lock(blocking_lock_record *blr)
offset = IVAL(inbuf,smb_vwv3);
errno = 0;
- if (!do_lock(fsp, conn, count, offset, WRITE_LOCK, &eclass, &ecode)) {
+ if (!do_lock(fsp, conn, (SMB_BIG_UINT)count, (SMB_BIG_UINT)offset, WRITE_LOCK, &eclass, &ecode)) {
if((errno != EACCES) && (errno != EAGAIN)) {
/*
@@ -389,7 +389,7 @@ static BOOL process_lockingX(blocking_lock_record *blr)
connection_struct *conn = conn_find(SVAL(inbuf,smb_tid));
uint16 num_ulocks = SVAL(inbuf,smb_vwv6);
uint16 num_locks = SVAL(inbuf,smb_vwv7);
- SMB_OFF_T count = 0, offset = 0;
+ SMB_BIG_UINT count = (SMB_BIG_UINT)0, offset = (SMB_BIG_UINT)0;
BOOL large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
char *data;
int eclass=0;
@@ -405,7 +405,7 @@ static BOOL process_lockingX(blocking_lock_record *blr)
for(; blr->lock_num < num_locks; blr->lock_num++) {
BOOL err;
- count = get_lock_count( data, blr->lock_num, large_file_format, &err);
+ count = get_lock_count( data, blr->lock_num, large_file_format);
offset = get_lock_offset( data, blr->lock_num, large_file_format, &err);
/*