diff options
author | Jeremy Allison <jra@samba.org> | 1997-09-26 19:26:56 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1997-09-26 19:26:56 +0000 |
commit | dff16872ca39c007d32d114af82d3ccd97f9d47a (patch) | |
tree | 503e542b459992e3c61945e9f8e5defe273a86f6 /source3/locking | |
parent | d939350de407db97422cb22ef885afed3fdf7cea (diff) | |
download | samba-dff16872ca39c007d32d114af82d3ccd97f9d47a.tar.gz samba-dff16872ca39c007d32d114af82d3ccd97f9d47a.tar.bz2 samba-dff16872ca39c007d32d114af82d3ccd97f9d47a.zip |
Syncing up current oplock work in progress. #ifdef'ed out
so should have no effect on other work.
Jeremy (jallison@whistle.com)
(This used to be commit 7e3d4c8b21f63a06d32605d230129e36883ad08c)
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/locking.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 64f24fb242..7aa0e7dcf9 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -285,6 +285,7 @@ bucket (number of entries now = %d)\n", share_array[num_entries_copied].share_mode = entry_scanner_p->share_mode; #ifdef USE_OPLOCKS share_array[num_entries_copied].op_port = entry_scanner_p->op_port; + share_array[num_entries_copied].op_type = entry_scanner_p->op_type; #endif /* USE_OPLOCKS */ memcpy(&share_array[num_entries_copied].time, &entry_scanner_p->time, sizeof(struct timeval)); @@ -464,7 +465,7 @@ dev = %d, inode = %d in hash bucket %d\n", dev, inode, hash_entry)); /******************************************************************* set the share mode of a file. Return False on fail, True on success. ********************************************************************/ -BOOL set_share_mode(share_lock_token token, int fnum, uint16 port) +BOOL set_share_mode(share_lock_token token, int fnum, uint16 port, uint16 op_type) { files_struct *fs_p = &Files[fnum]; int32 dev, inode; @@ -557,6 +558,7 @@ inode %d in hash bucket %d\n", fs_p->name, dev, inode, hash_entry)); new_entry_p->share_mode = fs_p->share_mode; #ifdef USE_OPLOCKS new_entry_p->op_port = port; + new_entry_p->op_type = op_type; #endif /* USE_OPLOCKS */ memcpy( (char *)&new_entry_p->time, (char *)&fs_p->open_time, sizeof(struct timeval)); @@ -892,6 +894,7 @@ it left a share mode entry with mode 0x%X in share file %s\n", share_array[num_entries_copied].pid = pid; #ifdef USE_OPLOCKS share_array[num_entries_copied].op_port = SVAL(p,SME_PORT_OFFSET); + share_array[num_entries_copied].op_type = SVAL(p,SME_OPLOCK_TYPE_OFFSET); #endif /* USE_OPLOCKS */ num_entries_copied++; @@ -939,6 +942,7 @@ position 0 for share mode file %s (%s)\n", fname, strerror(errno))); SIVAL(p,SME_USEC_OFFSET,share_array[i].time.tv_usec); #ifdef USE_OPLOCKS SIVAL(p,SME_PORT_OFFSET,share_array[i].op_port); + SIVAL(p,SME_OPLOCK_TYPE_OFFSET,share_array[i].op_type); #endif /* USE_OPLOCKS */ } @@ -1120,7 +1124,7 @@ mode file %s to size %d (%s)\n", fname, newsize, strerror(errno))); /******************************************************************* set the share mode of a file ********************************************************************/ -BOOL set_share_mode(share_lock_token token,int fnum, uint16 port) +BOOL set_share_mode(share_lock_token token,int fnum, uint16 port, uint16 op_type) { files_struct *fs_p = &Files[fnum]; pstring fname; @@ -1222,6 +1226,7 @@ deleting it.\n", fname)); SIVAL(p,SME_PID_OFFSET,pid); #ifdef USE_OPLOCKS SSVAL(p,SME_PORT_OFFSET,port); + SSVAL(p,SME_OPLOCK_TYPE_OFFSET,op_type); #endif /* USE_OPLOCKS */ num_entries++; |