From 1a15e42bcb4016c4c79d4d1e367deaa73da09ac3 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sat, 4 Mar 2017 13:55:55 +0100 Subject: s3/smbd: add const to get_lease_type() args Bug: https://bugzilla.samba.org/show_bug.cgi?id=7537 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 6924e72ade20e98ac470fcb6ba7120c61b06bb0f) --- source3/smbd/oplock.c | 3 ++- source3/smbd/proto.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index b94bc36ebba..56b4499bff4 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -171,7 +171,8 @@ uint32_t map_oplock_to_lease_type(uint16_t op_type) return ret; } -uint32_t get_lease_type(struct share_mode_data *d, struct share_mode_entry *e) +uint32_t get_lease_type(const struct share_mode_data *d, + const struct share_mode_entry *e) { if (e->op_type == LEASE_OPLOCK) { return d->leases[e->lease_idx].current_state; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 4ba73162d5b..77a3b21d02d 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -679,7 +679,8 @@ NTSTATUS get_relative_fid_filename(connection_struct *conn, /* The following definitions come from smbd/oplock.c */ uint32_t map_oplock_to_lease_type(uint16_t op_type); -uint32_t get_lease_type(struct share_mode_data *d, struct share_mode_entry *e); +uint32_t get_lease_type(const struct share_mode_data *d, + const struct share_mode_entry *e); bool update_num_read_oplocks(files_struct *fsp, struct share_mode_lock *lck); void break_kernel_oplock(struct messaging_context *msg_ctx, files_struct *fsp); -- cgit v1.2.1