summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/lib/messages.c13
-rw-r--r--source3/lib/messages_ctdbd.c14
2 files changed, 15 insertions, 12 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 52d6538542..0e0259236e 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -466,11 +466,14 @@ NTSTATUS messaging_send_iov(struct messaging_context *msg_ctx,
return NT_STATUS_NO_MEMORY;
}
- rec.msg_version = MESSAGE_VERSION;
- rec.msg_type = msg_type & MSG_TYPE_MASK;
- rec.dest = server;
- rec.src = msg_ctx->id;
- rec.buf = data_blob_const(buf, talloc_get_size(buf));
+ rec = (struct messaging_rec) {
+ .msg_version = MESSAGE_VERSION,
+ .msg_type = msg_type & MSG_TYPE_MASK,
+ .dest = server,
+ .src = msg_ctx->id,
+ .buf = data_blob_const(buf, talloc_get_size(buf)),
+ };
+
messaging_dispatch_rec(msg_ctx, &rec);
TALLOC_FREE(buf);
return NT_STATUS_OK;
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index add089da38..9c13260173 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -95,7 +95,6 @@ static int messaging_ctdb_send(struct server_id src,
{
struct messaging_ctdbd_context *ctx = talloc_get_type_abort(
backend->private_data, struct messaging_ctdbd_context);
-
struct messaging_rec msg;
uint8_t *buf;
NTSTATUS status;
@@ -105,12 +104,13 @@ static int messaging_ctdb_send(struct server_id src,
return ENOMEM;
}
-
- msg.msg_version = MESSAGE_VERSION;
- msg.msg_type = msg_type;
- msg.dest = pid;
- msg.src = src;
- msg.buf = data_blob_const(buf, talloc_get_size(buf));
+ msg = (struct messaging_rec) {
+ .msg_version = MESSAGE_VERSION,
+ .msg_type = msg_type,
+ .dest = pid,
+ .src = src,
+ .buf = data_blob_const(buf, talloc_get_size(buf)),
+ };
status = ctdbd_messaging_send(ctx->conn, pid.vnn, pid.pid, &msg);