summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-07-23 00:10:26 +0000
committerJeremy Allison <jra@samba.org>1998-07-23 00:10:26 +0000
commit06c0349c445958aebb8a4611bdb7082711585754 (patch)
tree68c22e9d853aa0f77717b519abb4832a52331f55 /source3/smbd/nttrans.c
parentf5866fd4ba8da9acde87c7f9da8f1a242540e287 (diff)
downloadsamba-06c0349c445958aebb8a4611bdb7082711585754.tar.gz
samba-06c0349c445958aebb8a4611bdb7082711585754.tar.bz2
samba-06c0349c445958aebb8a4611bdb7082711585754.zip
locking.c: Added lock type to is_locked() and do_lock()
as the code in reply_lockingX wasn't taking account of the difference between read and write locks ! How did this ever work :-) ! reply.c: server.c: Add lock type to is_locked() and do_lock(). util.c: Also added code from klausr@ITAP.Physik.Uni-Stuttgart.De to fix problem with log files growing too large if an smbd writes less than 100 debug messages. Jeremy. (This used to be commit 80080abf772a470d5f0f4dcd4a75fb2a09a9fb2a)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 672e2c0802..9b6cfe1621 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -620,12 +620,12 @@ int reply_ntcreate_and_X(char *inbuf,char *outbuf,int length,int bufsize)
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 12;
- if(sizeof(off_t) == 8) {
+#if OFF_T_IS_64_BITS
SIVAL(p,0, file_len & 0xFFFFFFFF);
SIVAL(p,4, file_len >> 32);
- } else {
+#else /* OFF_T_IS_64_BITS */
SIVAL(p,0,file_len);
- }
+#endif /* OFF_T_IS_64_BITS */
p += 12;
SCVAL(p,0,fsp->is_directory ? 1 : 0);
}
@@ -822,12 +822,12 @@ static int call_nt_transact_create(char *inbuf, char *outbuf, int length,
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 12;
- if(sizeof(off_t) == 8) {
+#if OFF_T_IS_64_BITS
SIVAL(p,0, file_len & 0xFFFFFFFF);
SIVAL(p,4, (file_len >> 32));
- } else {
+#else /* OFF_T_IS_64_BITS */
SIVAL(p,0,file_len);
- }
+#endif /* OFF_T_IS_64_BITS */
}
/* Send the required number of replies */