From 07478016d7354274cd53ff2b4ec1dda3f0f439d1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 8 Feb 2007 00:58:17 +0000 Subject: r21230: added the hooks needed in the cluster layer and the messaging code for handling messages to remote nodes. Implemented dummy functions in the 'local' cluster backend for the messaging hooks, and modified the messaging layer to check if the destination is remote and redirect messages via the cluster layer (This used to be commit 4474552e8fb73efebef32ad8480d7fe9a1e379ef) --- source4/cluster/local.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'source4/cluster/local.c') diff --git a/source4/cluster/local.c b/source4/cluster/local.c index 28a0576acc..338bac500a 100644 --- a/source4/cluster/local.c +++ b/source4/cluster/local.c @@ -65,10 +65,42 @@ static struct tdb_wrap *local_tdb_tmp_open(struct cluster_ops *ops, return w; } +/* + dummy backend handle function +*/ +static void *local_backend_handle(struct cluster_ops *ops) +{ + return NULL; +} + +/* + dummy message init function - not needed as all messages are local +*/ +static NTSTATUS local_message_init(struct cluster_ops *ops, + struct messaging_context *msg, + struct server_id server, + cluster_message_fn_t handler) +{ + return NT_STATUS_OK; +} + +/* + dummy message send +*/ +static NTSTATUS local_message_send(struct cluster_ops *ops, + struct server_id server, uint32_t msg_type, + DATA_BLOB *data) +{ + return NT_STATUS_INVALID_DEVICE_REQUEST; +} + static struct cluster_ops cluster_local_ops = { .cluster_id = local_id, .cluster_id_string = local_id_string, .cluster_tdb_tmp_open = local_tdb_tmp_open, + .backend_handle = local_backend_handle, + .message_init = local_message_init, + .message_send = local_message_send, .private = NULL }; -- cgit