summaryrefslogtreecommitdiffstats
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 165df56af50..75cf18785cb 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -33,6 +33,7 @@ extern int Client;
extern int oplock_sock;
extern int smb_read_error;
extern fstring local_machine;
+extern int global_oplock_break;
/****************************************************************************
Send the required number of replies back.
@@ -1743,6 +1744,19 @@ int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize)
char *params = NULL, *data = NULL;
int num_params, num_params_sofar, num_data, num_data_sofar;
+ if(global_oplock_break && (tran_call == TRANSACT2_OPEN))
+ {
+ /*
+ * Queue this open message as we are the process of an oplock break.
+ */
+
+ DEBUG(2,("%s: reply_trans2: queueing message trans2open due to being in oplock break state.\n",
+ timestring() ));
+
+ push_smb_message( inbuf, length);
+ return -1;
+ }
+
outsize = set_message(outbuf,0,0,True);
/* All trans2 messages we handle have smb_sucnt == 1 - ensure this