From: Volker Lendecke Date: Wed, 5 Jul 2017 07:34:51 +0000 (+0200) Subject: notifyd: Consolidate two #ifdef CLUSTER into one X-Git-Tag: samba-4.6.9~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cf36b273d3cde3bb32bb336576af5ca178e2af1;p=thirdparty%2Fsamba.git notifyd: Consolidate two #ifdef CLUSTER into one Bug: https://bugzilla.samba.org/show_bug.cgi?id=12903 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit d0a7bccae9856aba44a057c09499aa0de6b21862) --- diff --git a/source3/smbd/notifyd/notifyd.c b/source3/smbd/notifyd/notifyd.c index 0de56dab2ad..e747be2756f 100644 --- a/source3/smbd/notifyd/notifyd.c +++ b/source3/smbd/notifyd/notifyd.c @@ -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);