]> 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)
committerStefan Metzmacher <metze@samba.org>
Thu, 2 Jul 2020 15:25:32 +0000 (15:25 +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>
source3/smbd/oplock.c
source3/smbd/proto.h

index c63f97aac0adfeeeb9fc99bca06c2b8491965b1d..97ab05b2ba67d5d16cf5316f90d2f7385125c57b 100644 (file)
@@ -169,7 +169,7 @@ static void downgrade_file_oplock(files_struct *fsp)
        TALLOC_FREE(fsp->oplock_timeout);
 }
 
-uint32_t get_lease_type(const struct share_mode_entry *e, struct file_id id)
+uint32_t get_lease_type(struct share_mode_entry *e, struct file_id id)
 {
        NTSTATUS status;
        uint32_t current_state;
index eeb6fcbf3d6aa436d2e71a16d1b5df9e486ea966..118e926b55f8bf929e5f361f725d08fc2bd53c12 100644 (file)
@@ -774,7 +774,7 @@ NTSTATUS create_file_default(connection_struct *conn,
 
 /* The following definitions come from smbd/oplock.c  */
 
-uint32_t get_lease_type(const struct share_mode_entry *e, struct file_id id);
+uint32_t get_lease_type(struct share_mode_entry *e, struct file_id id);
 
 void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp);
 NTSTATUS set_file_oplock(files_struct *fsp);