]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Move send_break_message_smb1 to smb1_oplock.c
authorDavid Mulder <dmulder@suse.com>
Tue, 15 Mar 2022 20:36:06 +0000 (14:36 -0600)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:29 +0000 (17:37 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/oplock.c
source3/smbd/smb1_oplock.c
source3/smbd/smb1_oplock.h

index 3fa5691f96e2066475a811c29f82c59403ee1aba..fe4d4831bfce03156b6dc3d67ccb33abdad76116 100644 (file)
@@ -813,28 +813,6 @@ static void add_oplock_timeout_handler(files_struct *fsp)
        }
 }
 
-static void send_break_message_smb1(files_struct *fsp, int level)
-{
-       struct smbXsrv_connection *xconn = NULL;
-       char break_msg[SMB1_BREAK_MESSAGE_LENGTH];
-
-       /*
-        * For SMB1 we only have one connection
-        */
-       xconn = fsp->conn->sconn->client->connections;
-
-       new_break_message_smb1(fsp, level, break_msg);
-
-       show_msg(break_msg);
-       if (!srv_send_smb(xconn,
-                       break_msg, false, 0,
-                       IS_CONN_ENCRYPTED(fsp->conn),
-                       NULL)) {
-               exit_server_cleanly("send_break_message_smb1: "
-                       "srv_send_smb failed.");
-       }
-}
-
 /*******************************************************************
  This handles the generic oplock break message from another smbd.
 *******************************************************************/
index 496fba043a57773cf8ece90980d478db910d4dab..14e17fd34122696c988575712de7f593340617c8 100644 (file)
@@ -47,3 +47,25 @@ void new_break_message_smb1(files_struct *fsp, int cmd,
        SCVAL(result,smb_vwv3,LOCKING_ANDX_OPLOCK_RELEASE);
        SCVAL(result,smb_vwv3+1,cmd);
 }
+
+void send_break_message_smb1(files_struct *fsp, int level)
+{
+       struct smbXsrv_connection *xconn = NULL;
+       char break_msg[SMB1_BREAK_MESSAGE_LENGTH];
+
+       /*
+        * For SMB1 we only have one connection
+        */
+       xconn = fsp->conn->sconn->client->connections;
+
+       new_break_message_smb1(fsp, level, break_msg);
+
+       show_msg(break_msg);
+       if (!srv_send_smb(xconn,
+                       break_msg, false, 0,
+                       IS_CONN_ENCRYPTED(fsp->conn),
+                       NULL)) {
+               exit_server_cleanly("send_break_message_smb1: "
+                       "srv_send_smb failed.");
+       }
+}
index a3a9cf5e509bee29134bc4e0272e755bced7b97d..a9b3c47b9dc971c17ea81af3759b1e5aa6a6bcd0 100644 (file)
@@ -23,3 +23,4 @@
 
 void new_break_message_smb1(files_struct *fsp, int cmd,
                            char result[SMB1_BREAK_MESSAGE_LENGTH]);
+void send_break_message_smb1(files_struct *fsp, int level);