]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: let get_lease_type() take a non-const share_mode_entry
authorRalph Boehme <slow@samba.org>
Thu, 2 Jul 2020 12:45:59 +0000 (14:45 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 Aug 2020 12:18:21 +0000 (12:18 +0000)
We're going to add a call to share_entry_stale_pid(share_mode_entry) which takes
a non-const pointer (in order to eventually set e->state = true).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14428

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(backported from commit 3f4a865821da27efbed4f7c38ad3efbcaae77a02)
[slow@samba.org: get_lease_type() takes arg d in 4.11]

source3/smbd/oplock.c
source3/smbd/proto.h

index 16484bb3d9d510eef97225452a85572e0ad94c57..83539693b9c7ecd010ffdb7a2039a174cbff5ab2 100644 (file)
@@ -172,8 +172,8 @@ static void downgrade_file_oplock(files_struct *fsp)
        TALLOC_FREE(fsp->oplock_timeout);
 }
 
-uint32_t get_lease_type(const struct share_mode_data *d,
-                       const struct share_mode_entry *e)
+uint32_t get_lease_type(struct share_mode_data *d,
+                       struct share_mode_entry *e)
 {
        NTSTATUS status;
        uint32_t current_state;
index 6e2509e7c574b4691cd53278223576ed17320f12..82be9b4e364fea43e9e7e737dab53c2979b98ac9 100644 (file)
@@ -720,8 +720,8 @@ NTSTATUS create_file_default(connection_struct *conn,
 
 /* The following definitions come from smbd/oplock.c  */
 
-uint32_t get_lease_type(const struct share_mode_data *d,
-                       const struct share_mode_entry *e);
+uint32_t get_lease_type(struct share_mode_data *d,
+                       struct share_mode_entry *e);
 
 void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp);
 NTSTATUS set_file_oplock(files_struct *fsp);