1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4: messaging. Minor cleanup. Check for error returns on imessaging_register calls.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Jeremy Allison 2017-03-31 11:07:35 -07:00
parent 5c04521b8e
commit 61157388e7

View File

@ -322,6 +322,7 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
struct server_id server_id,
struct tevent_context *ev)
{
NTSTATUS status;
struct imessaging_context *msg;
bool ok;
int ret;
@ -393,11 +394,28 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
goto fail;
}
imessaging_register(msg, NULL, MSG_PING, ping_message);
imessaging_register(msg, NULL, MSG_REQ_POOL_USAGE, pool_message);
imessaging_register(msg, NULL, MSG_IRPC, irpc_handler);
imessaging_register(msg, NULL, MSG_REQ_RINGBUF_LOG, ringbuf_log_msg);
IRPC_REGISTER(msg, irpc, IRPC_UPTIME, irpc_uptime, msg);
status = imessaging_register(msg, NULL, MSG_PING, ping_message);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
status = imessaging_register(msg, NULL, MSG_REQ_POOL_USAGE,
pool_message);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
status = imessaging_register(msg, NULL, MSG_IRPC, irpc_handler);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
status = imessaging_register(msg, NULL, MSG_REQ_RINGBUF_LOG,
ringbuf_log_msg);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
status = IRPC_REGISTER(msg, irpc, IRPC_UPTIME, irpc_uptime, msg);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
DLIST_ADD(msg_ctxs, msg);