]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
notifyd: Consolidate two #ifdef CLUSTER into one
authorVolker Lendecke <vl@samba.org>
Wed, 5 Jul 2017 07:34:51 +0000 (09:34 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 25 Oct 2017 06:43:00 +0000 (08:43 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12903

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit d0a7bccae9856aba44a057c09499aa0de6b21862)

source3/smbd/notifyd/notifyd.c

index 0de56dab2ad22a7c3dbfc4763c26b6ef3c6b3152..e747be2756fe01e4342fd253243a6523826cbec5 100644 (file)
@@ -240,18 +240,6 @@ struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
        }
        tevent_req_set_callback(subreq, notifyd_handler_done, req);
 
-#ifdef CLUSTER_SUPPORT
-       if (ctdbd_conn != NULL) {
-               subreq = messaging_handler_send(state, ev, msg_ctx,
-                                               MSG_SMB_NOTIFY_DB,
-                                               notifyd_got_db, state);
-               if (tevent_req_nomem(subreq, req)) {
-                       return tevent_req_post(req, ev);
-               }
-               tevent_req_set_callback(subreq, notifyd_handler_done, req);
-       }
-#endif
-
        names_db = messaging_names_db(msg_ctx);
 
        ret = server_id_db_set_exclusive(names_db, "notify-daemon");
@@ -272,6 +260,15 @@ struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
 
 #ifdef CLUSTER_SUPPORT
        if (ctdbd_conn != NULL) {
+
+               subreq = messaging_handler_send(state, ev, msg_ctx,
+                                               MSG_SMB_NOTIFY_DB,
+                                               notifyd_got_db, state);
+               if (tevent_req_nomem(subreq, req)) {
+                       return tevent_req_post(req, ev);
+               }
+               tevent_req_set_callback(subreq, notifyd_handler_done, req);
+
                state->log = talloc_zero(state, struct messaging_reclog);
                if (tevent_req_nomem(state->log, req)) {
                        return tevent_req_post(req, ev);