diff options
author | Jeremy Allison <jra@samba.org> | 2005-09-13 23:11:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:03:38 -0500 |
commit | f94d9826465b391faa4a4697e03459104065c115 (patch) | |
tree | 382826d899ed08c72b73c607cae90641ba774555 | |
parent | 6a8ce7487b9282a6a6025c7b18bbe3bc1fc75178 (diff) | |
download | samba-f94d9826465b391faa4a4697e03459104065c115.tar.gz samba-f94d9826465b391faa4a4697e03459104065c115.tar.bz2 samba-f94d9826465b391faa4a4697e03459104065c115.zip |
r10217: Remember to exit correctly when we find a matching entry to change.
Jeremy.
(This used to be commit 142c84eb31a4f2577d5f4bb0f541440d84eb607f)
-rw-r--r-- | source3/libsmb/smb_share_modes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c index ddc4e13ff6..87a386307c 100644 --- a/source3/libsmb/smb_share_modes.c +++ b/source3/libsmb/smb_share_modes.c @@ -429,7 +429,7 @@ int smb_change_share_mode_entry(struct smbdb_ctx *db_ctx, ld = (struct locking_data *)db_data.dptr; num_share_modes = ld->u.s.num_share_mode_entries; - shares = (share_mode_entry *)(db_data.dptr + sizeof(struct locking_data)); + shares = (share_mode_entry *)(db_data.dptr + sizeof(share_mode_entry)); for (i = 0; i < num_share_modes; i++) { share_mode_entry *share = &shares[i]; @@ -442,6 +442,7 @@ int smb_change_share_mode_entry(struct smbdb_ctx *db_ctx, if (share_mode_entry_equal(set_entry, share)) { create_share_mode_entry(share, new_entry); + found_entry = 1; break; } } |