summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-10-31 13:08:18 +0100
committerStefan Metzmacher <metze@samba.org>2013-03-26 11:22:50 +0100
commiteb885d1fdd6a2be603061aeef63790c92ca9ba56 (patch)
tree21c32225dd8004293856ae10f22465f44ae7c985
parent032da72e2b81685f292622cfd2ced14af257849d (diff)
downloadsamba-eb885d1fdd6a2be603061aeef63790c92ca9ba56.tar.gz
samba-eb885d1fdd6a2be603061aeef63790c92ca9ba56.tar.bz2
samba-eb885d1fdd6a2be603061aeef63790c92ca9ba56.zip
smbd: Slightly simplify notify_trigger
This straightens the for-loop walking the path components slightly Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/smbd/notify_internal.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index af838d6097..ddf8160cb0 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -627,6 +627,7 @@ void notify_trigger(struct notify_context *notify,
idx_state.mem_ctx = talloc_tos();
idx_state.vnns = NULL;
+ idx_state.found_my_vnn = false;
idx_state.my_vnn = get_my_vnn();
for (p = strchr(path+1, '/'); p != NULL; p = next_p) {
@@ -636,18 +637,16 @@ void notify_trigger(struct notify_context *notify,
next_p = strchr(p+1, '/');
recursive = (next_p != NULL);
- idx_state.found_my_vnn = false;
-
dbwrap_parse_record(
notify->db_index,
make_tdb_data(discard_const_p(uint8_t, path), path_len),
notify_trigger_index_parser, &idx_state);
- if (!idx_state.found_my_vnn) {
- continue;
+ if (idx_state.found_my_vnn) {
+ notify_trigger_local(notify, action, filter,
+ path, path_len, recursive);
+ idx_state.found_my_vnn = false;
}
- notify_trigger_local(notify, action, filter,
- path, path_len, recursive);
}
ctdbd_conn = messaging_ctdbd_connection();