Author: vlendec Date: 2007-07-24 11:47:37 +0000 (Tue, 24 Jul 2007) New Revision: 24032
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24032 Log: It helps testing tremendously if the cluster messaging actually sends and receives messages to other nodes... :-) Modified: branches/SAMBA_3_2/source/lib/messages.c branches/SAMBA_3_2/source/lib/messages_ctdbd.c branches/SAMBA_3_2_0/source/lib/messages.c branches/SAMBA_3_2_0/source/lib/messages_ctdbd.c Changeset: Modified: branches/SAMBA_3_2/source/lib/messages.c =================================================================== --- branches/SAMBA_3_2/source/lib/messages.c 2007-07-24 11:45:29 UTC (rev 24031) +++ branches/SAMBA_3_2/source/lib/messages.c 2007-07-24 11:47:37 UTC (rev 24032) @@ -320,6 +320,13 @@ struct server_id server, uint32_t msg_type, const DATA_BLOB *data) { +#ifdef CLUSTER_SUPPORT + if (!procid_is_local(&server)) { + return msg_ctx->remote->send_fn(msg_ctx, server, + msg_type, data, + msg_ctx->remote); + } +#endif return msg_ctx->local->send_fn(msg_ctx, server, msg_type, data, msg_ctx->local); } Modified: branches/SAMBA_3_2/source/lib/messages_ctdbd.c =================================================================== --- branches/SAMBA_3_2/source/lib/messages_ctdbd.c 2007-07-24 11:45:29 UTC (rev 24031) +++ branches/SAMBA_3_2/source/lib/messages_ctdbd.c 2007-07-24 11:47:37 UTC (rev 24032) @@ -94,6 +94,15 @@ return status; } + status = ctdbd_register_msg_ctx(ctx->conn, msg_ctx); + + if (!NT_STATUS_IS_OK(status)) { + DEBUG(10, ("ctdbd_register_msg_ctx failed: %s\n", + nt_errstr(status))); + TALLOC_FREE(result); + return status; + } + global_ctdbd_connection = ctx->conn; talloc_set_destructor(ctx, messaging_ctdbd_destructor); Modified: branches/SAMBA_3_2_0/source/lib/messages.c =================================================================== --- branches/SAMBA_3_2_0/source/lib/messages.c 2007-07-24 11:45:29 UTC (rev 24031) +++ branches/SAMBA_3_2_0/source/lib/messages.c 2007-07-24 11:47:37 UTC (rev 24032) @@ -320,6 +320,13 @@ struct server_id server, uint32_t msg_type, const DATA_BLOB *data) { +#ifdef CLUSTER_SUPPORT + if (!procid_is_local(&server)) { + return msg_ctx->remote->send_fn(msg_ctx, server, + msg_type, data, + msg_ctx->remote); + } +#endif return msg_ctx->local->send_fn(msg_ctx, server, msg_type, data, msg_ctx->local); } Modified: branches/SAMBA_3_2_0/source/lib/messages_ctdbd.c =================================================================== --- branches/SAMBA_3_2_0/source/lib/messages_ctdbd.c 2007-07-24 11:45:29 UTC (rev 24031) +++ branches/SAMBA_3_2_0/source/lib/messages_ctdbd.c 2007-07-24 11:47:37 UTC (rev 24032) @@ -94,6 +94,15 @@ return status; } + status = ctdbd_register_msg_ctx(ctx->conn, msg_ctx); + + if (!NT_STATUS_IS_OK(status)) { + DEBUG(10, ("ctdbd_register_msg_ctx failed: %s\n", + nt_errstr(status))); + TALLOC_FREE(result); + return status; + } + global_ctdbd_connection = ctx->conn; talloc_set_destructor(ctx, messaging_ctdbd_destructor);
