s3/smbd: add const to get_lease_type() args
authorRalph Boehme <slow@samba.org>
Sat, 4 Mar 2017 12:55:55 +0000 (13:55 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 10 Mar 2017 02:28:25 +0000 (03:28 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=7537

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/oplock.c
source3/smbd/proto.h

index 8e29f0db4b0983846b142f0f6c03eb631eae5ab0..e8a5a161722df965ab1568e50b06b494ef3458a1 100644 (file)
@@ -172,7 +172,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;
index 7ccb12a6a3ca2b4a4d4e8ce4b3d593c15bf34462..06ab56f535fdd79716d2e609db388c0115142ef3 100644 (file)
@@ -704,7 +704,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);