summaryrefslogtreecommitdiff
path: root/source3/lib/messages_ctdbd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-06-23 16:55:09 +0200
committerVolker Lendecke <vl@samba.org>2015-07-14 06:51:21 +0200
commitdb1bee97f28ab57868aae6512d6d39e08450b6c3 (patch)
treeed85f46f278bab0a6c48631f26ecf700993f2076 /source3/lib/messages_ctdbd.c
parenteca508f3c821a73ab08c079ba3ca3522363ad59f (diff)
downloadsamba-db1bee97f28ab57868aae6512d6d39e08450b6c3.tar.gz
ctdbd_conn: Make register_with_ctdbd use an int-returning callback
This will allow an early return from ctdbd_msg_call_back so that we can also handle CTDB_SRVID_RELEASE_IP via register_with_ctdbd. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib/messages_ctdbd.c')
-rw-r--r--source3/lib/messages_ctdbd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index 248fc0df7df..294debe94c4 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -109,7 +109,7 @@ static int messaging_ctdbd_destructor(struct messaging_ctdbd_context *ctx)
return 0;
}
-static void messaging_ctdb_recv(
+static int messaging_ctdb_recv(
uint32_t src_vnn, uint32_t dst_vnn, uint64_t dst_srvid,
const uint8_t *msg, size_t msg_len, void *private_data)
{
@@ -125,7 +125,7 @@ static void messaging_ctdb_recv(
if (msg_len < MESSAGE_HDR_LENGTH) {
DEBUG(1, ("%s: message too short: %u\n", __func__,
(unsigned)msg_len));
- return;
+ return 0;
}
message_hdr_get(&msg_type, &src, &dst, msg);
@@ -145,7 +145,7 @@ static void messaging_ctdb_recv(
DEBUG(10, ("%s: I'm %s, ignoring msg to %s\n", __func__,
server_id_str_buf(me, &id1),
server_id_str_buf(dst, &id2)));
- return;
+ return 0;
}
/*
@@ -159,6 +159,8 @@ static void messaging_ctdb_recv(
DEBUG(10, ("%s: messaging_send_iov_from failed: %s\n",
__func__, nt_errstr(status)));
}
+
+ return 0;
}
NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,