register the ctdbd reconfigure message
authorAndrew Tridgell <tridge@samba.org>
Fri, 8 Aug 2008 10:31:03 +0000 (20:31 +1000)
committerMichael Adam <obnox@samba.org>
Wed, 13 Aug 2008 09:54:12 +0000 (11:54 +0200)
source/lib/ctdbd_conn.c
source/smbd/server.c

index 45dd019efcd4d5ce14fbc7da3ac1f0762c8b1d96..5fc4b7ce1fdf0ffaa300fb5822f11fde747d66f0 100644 (file)
@@ -353,6 +353,14 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32 reqid,
                        goto next_pkt;
                }
 
+               if (msg->srvid == CTDB_SRVID_RECONFIGURE) {
+                       DEBUG(0,("Got cluster reconfigure message in ctdb_read_req\n"));
+                       messaging_send(conn->msg_ctx, procid_self(),
+                                      MSG_SMB_BRL_VALIDATE, &data_blob_null);
+                       TALLOC_FREE(hdr);
+                       goto next_pkt;
+               }
+
                if (!(msg_state = TALLOC_P(NULL, struct deferred_msg_state))) {
                        DEBUG(0, ("talloc failed\n"));
                        TALLOC_FREE(hdr);
index 05f11f6753c7ab7f43d736af7fc3f5232f94aac7..d083fec494d1ff2f6a5dd6d54be2a00505ddec92 100644 (file)
@@ -573,6 +573,10 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_
                           MSG_SMB_STAT_CACHE_DELETE, smb_stat_cache_delete);
        brl_register_msgs(smbd_messaging_context());
 
+#ifdef CLUSTER_SUPPORT
+       ctdbd_register_reconfigure(messaging_ctdbd_connection());
+#endif
+
 #ifdef DEVELOPER
        messaging_register(smbd_messaging_context(), NULL,
                           MSG_SMB_INJECT_FAULT, msg_inject_fault);