It's not really clear why e.stale would be ignored if *modified is set
to true.
This matches the behavior of share_mode_entry_do()
This also makes sure we see the removed entry in level 10 logs again.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14428
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
deb2f782c95a5e59a0a5da4272239c2d31bc2b6d)
(int)modified,
(int)e.stale);
+ if (e.stale) {
+ if (*i < *num_share_modes) {
+ memmove(blob.data,
+ blob.data + SHARE_MODE_ENTRY_SIZE,
+ (*num_share_modes - *i - 1) *
+ SHARE_MODE_ENTRY_SIZE);
+ }
+ *num_share_modes -= 1;
+ *writeback = true;
+ return stop;
+ }
+
if (modified) {
if (DEBUGLEVEL>=10) {
DBG_DEBUG("share_mode_entry:\n");
return stop;
}
- if (e.stale) {
- if (*i < *num_share_modes) {
- memmove(blob.data,
- blob.data + SHARE_MODE_ENTRY_SIZE,
- (*num_share_modes - *i - 1) *
- SHARE_MODE_ENTRY_SIZE);
- }
- *num_share_modes -= 1;
- *writeback = true;
- return stop;
- }
-
if (stop) {
return true;
}