diff options
author | Jeremy Allison <jra@samba.org> | 1998-07-30 21:18:57 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-07-30 21:18:57 +0000 |
commit | 7284bb5ca049a682097bb25afcf25d40f1ac5479 (patch) | |
tree | 542affec24b496d6114f465bc65abb73823e367e /source3/locking | |
parent | 7d5d83ececdc43f0523b7b231537e230d9686034 (diff) | |
download | samba-7284bb5ca049a682097bb25afcf25d40f1ac5479.tar.gz samba-7284bb5ca049a682097bb25afcf25d40f1ac5479.tar.xz samba-7284bb5ca049a682097bb25afcf25d40f1ac5479.zip |
Makefile.in: Moved UBIQX stuff into UTILOBJ.
loadparm.c: Added "ole locking compatibility" option (default "true").
locking.c: Changes to implement union in files_struct.
locking_shm.c: Changes to implement union in files_struct.
nttrans.c: Made opening a directory explicit (we have to).
Added create directory code for nttrans.
reply.c: Changes to implement union in files_struct.
server.c: Changes to implement union in files_struct. Added create directory code.
trans2.c: Changes to implement union in files_struct.
smb.h: Changes to implement union in files_struct.
util.c: Changed linked list code to UNIQX linked list. This will make
the other lists I need to implement for ChangeNotify and blocking
locks easier.
Jeremy.
(This used to be commit 3a5eea850bb256b39cff8ace1e4fb4e0c1f5472b)
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/locking.c | 10 | ||||
-rw-r--r-- | source3/locking/locking_shm.c | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c index e303fb54821..1b01efd7efc 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -45,7 +45,7 @@ static struct share_ops *share_ops; static int map_lock_type( files_struct *fsp, int lock_type) { - if((lock_type == F_WRLCK) && (fsp->fd_ptr->real_open_flags == O_RDONLY)) { + if((lock_type == F_WRLCK) && (fsp->f_u.fd_ptr->real_open_flags == O_RDONLY)) { /* * Many UNIX's cannot get a write lock on a file opened read-only. * Win32 locking semantics allow this. @@ -53,7 +53,7 @@ static int map_lock_type( files_struct *fsp, int lock_type) */ DEBUG(10,("map_lock_type: Downgrading write lock to read due to read-only file.\n")); return F_RDLCK; - } else if( (lock_type == F_RDLCK) && (fsp->fd_ptr->real_open_flags == O_WRONLY)) { + } else if( (lock_type == F_RDLCK) && (fsp->f_u.fd_ptr->real_open_flags == O_WRONLY)) { /* * Ditto for read locks on write only files. */ @@ -90,7 +90,7 @@ BOOL is_locked(int fnum,int cnum,uint32 count,uint32 offset, int lock_type) * fd. So we don't need to use map_lock_type here. */ - return(fcntl_lock(fsp->fd_ptr->fd,F_GETLK,offset,count,lock_type)); + return(fcntl_lock(fsp->f_u.fd_ptr->fd,F_GETLK,offset,count,lock_type)); } @@ -114,7 +114,7 @@ BOOL do_lock(int fnum,int cnum,uint32 count,uint32 offset,int lock_type, } if (OPEN_FNUM(fnum) && fsp->can_lock && (fsp->cnum == cnum)) - ok = fcntl_lock(fsp->fd_ptr->fd,F_SETLK,offset,count, + ok = fcntl_lock(fsp->f_u.fd_ptr->fd,F_SETLK,offset,count, map_lock_type(fsp,lock_type)); if (!ok) { @@ -139,7 +139,7 @@ BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 * return(True); if (OPEN_FNUM(fnum) && fsp->can_lock && (fsp->cnum == cnum)) - ok = fcntl_lock(fsp->fd_ptr->fd,F_SETLK,offset,count,F_UNLCK); + ok = fcntl_lock(fsp->f_u.fd_ptr->fd,F_SETLK,offset,count,F_UNLCK); if (!ok) { *eclass = ERRDOS; diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c index 43a927e14c7..95d59a8465e 100644 --- a/source3/locking/locking_shm.c +++ b/source3/locking/locking_shm.c @@ -268,8 +268,8 @@ static void shm_del_share_mode(int token, int fnum) BOOL found = False; int pid = getpid(); - dev = Files[fnum].fd_ptr->dev; - inode = Files[fnum].fd_ptr->inode; + dev = Files[fnum].f_u.fd_ptr->dev; + inode = Files[fnum].f_u.fd_ptr->inode; hash_entry = HASH_ENTRY(dev, inode); @@ -396,8 +396,8 @@ static BOOL shm_set_share_mode(int token, int fnum, uint16 port, uint16 op_type) int new_entry_offset; BOOL found = False; - dev = fs_p->fd_ptr->dev; - inode = fs_p->fd_ptr->inode; + dev = fs_p->f_u.fd_ptr->dev; + inode = fs_p->f_u.fd_ptr->inode; hash_entry = HASH_ENTRY(dev, inode); @@ -505,8 +505,8 @@ static BOOL shm_remove_share_oplock(int fnum, int token) BOOL found = False; int pid = getpid(); - dev = Files[fnum].fd_ptr->dev; - inode = Files[fnum].fd_ptr->inode; + dev = Files[fnum].f_u.fd_ptr->dev; + inode = Files[fnum].f_u.fd_ptr->inode; hash_entry = HASH_ENTRY(dev, inode); |