summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-08-07 05:36:08 +0000
committerJeremy Allison <jra@samba.org>2003-08-07 05:36:08 +0000
commit3bbe9c0869ea8653f684afa9a1345f6fa2f80b4b (patch)
tree9a6a6e119b868063e7f998cb7b36afb07af01570 /source3/smbd
parenta3513090e77ddf380f7de67fc625e15ad16d5e4b (diff)
downloadsamba-3bbe9c0869ea8653f684afa9a1345f6fa2f80b4b.tar.gz
samba-3bbe9c0869ea8653f684afa9a1345f6fa2f80b4b.tar.bz2
samba-3bbe9c0869ea8653f684afa9a1345f6fa2f80b4b.zip
An oplock break reply from the client causes the sequence number to be
updated by 2 if there is no open reply outstanding, else by one.... Yes - this makes no sense.... Jeremy. (This used to be commit b43ce1ff6109f6422a621329ceb713b42df40040)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c6
-rw-r--r--source3/smbd/oplock.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 5f49640aa4..2c9d3290d8 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -626,6 +626,12 @@ static int open_mode_check(connection_struct *conn, const char *fname, SMB_DEV_T
DEBUG(5,("open_mode_check: oplock_request = %d, breaking oplock (%x) on file %s, \
dev = %x, inode = %.0f\n", *p_oplock_request, share_entry->op_type, fname, (unsigned int)dev, (double)inode));
+ /* Ensure the reply for the open uses the correct sequence number. */
+ /* This isn't a real deferred packet as it's response will also increment
+ * the sequence.
+ */
+ srv_defer_sign_response(get_current_mid(), False);
+
/* Oplock break - unlock to request it. */
unlock_share_entry(conn, dev, inode);
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 49a1b7d8cf..19e6956d9e 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -743,10 +743,6 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id,
/* Remember if we just sent a break to level II on this file. */
fsp->sent_oplock_break = using_levelII? LEVEL_II_BREAK_SENT:EXCLUSIVE_BREAK_SENT;
- /* Ensure the reply for the open uses the correct sequence number. */
- /* This isn't a real deferred packet as it's response will also increment
- * the sequence. */
- srv_defer_sign_response(get_current_mid(), False);
/* Save the server smb signing state. */
sign_state = srv_oplock_set_signing(False);