From e0e5f67da522521a37622a5833b8699ae63e8c27 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 14 Sep 2013 13:49:14 +0200 Subject: smbd: Convert set_share_mode to return bool for success Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/locking/locking.c | 4 ++-- source3/locking/proto.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/locking') diff --git a/source3/locking/locking.c b/source3/locking/locking.c index f584e0cf65..055d0f8245 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -734,12 +734,12 @@ static bool add_share_mode_entry(struct share_mode_data *d, return true; } -void set_share_mode(struct share_mode_lock *lck, files_struct *fsp, +bool set_share_mode(struct share_mode_lock *lck, files_struct *fsp, uid_t uid, uint64_t mid, uint16 op_type) { struct share_mode_entry entry; fill_share_mode_entry(&entry, fsp, uid, mid, op_type); - add_share_mode_entry(lck->data, &entry); + return add_share_mode_entry(lck->data, &entry); } /******************************************************************* diff --git a/source3/locking/proto.h b/source3/locking/proto.h index dde0be431d..02e2bf5307 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -171,7 +171,7 @@ void get_file_infos(struct file_id id, struct timespec *write_time); bool is_valid_share_mode_entry(const struct share_mode_entry *e); bool share_mode_stale_pid(struct share_mode_data *d, uint32_t idx); -void set_share_mode(struct share_mode_lock *lck, files_struct *fsp, +bool set_share_mode(struct share_mode_lock *lck, files_struct *fsp, uid_t uid, uint64_t mid, uint16 op_type); bool del_share_mode(struct share_mode_lock *lck, files_struct *fsp); bool mark_share_mode_disconnected(struct share_mode_lock *lck, -- cgit