summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-06-16 15:20:22 +0200
committerJeremy Allison <jra@samba.org>2017-07-07 00:52:24 +0200
commit939576d968d1e0159456baf6dd1e3c454b98995a (patch)
tree325bf883f2b613dc0b28c60e0186d13f77c316d4 /source3/smbd/server.c
parentb6d6f67bad397f30b6b5779c4e8ba8bf12f49d4b (diff)
downloadsamba-939576d968d1e0159456baf6dd1e3c454b98995a.tar.gz
notifyd: Only ask for messaging_ctdb_conn when clustering
Without clustering, messaging_ctdb_conn will fail anyway. Review with "git show -b". Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index fa13dbc9b18..e18a4e55260 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -334,6 +334,7 @@ static struct tevent_req *notifyd_req(struct messaging_context *msg_ctx,
struct tevent_req *req;
sys_notify_watch_fn sys_notify_watch = NULL;
struct sys_notify_context *sys_notify_ctx = NULL;
+ struct ctdbd_connection *ctdbd_conn = NULL;
if (lp_kernel_change_notify()) {
@@ -358,8 +359,11 @@ static struct tevent_req *notifyd_req(struct messaging_context *msg_ctx,
}
}
- req = notifyd_send(msg_ctx, ev, msg_ctx,
- messaging_ctdbd_connection(),
+ if (lp_clustering()) {
+ ctdbd_conn = messaging_ctdbd_connection();
+ }
+
+ req = notifyd_send(msg_ctx, ev, msg_ctx, ctdbd_conn,
sys_notify_watch, sys_notify_ctx);
if (req == NULL) {
TALLOC_FREE(sys_notify_ctx);