}
}
-static bool messaging_is_self_send(const struct messaging_context *msg_ctx,
- const struct server_id *dst)
-{
- return ((msg_ctx->id.vnn == dst->vnn) &&
- (msg_ctx->id.pid == dst->pid));
-}
-
/*
Send a message to a particular server
*/
return NT_STATUS_OK;
}
- if (messaging_is_self_send(msg_ctx, &server)) {
+ if (server_id_same_process(&msg_ctx->id, &server)) {
struct messaging_rec rec;
uint8_t *buf;
+ /*
+ * Self-send, directly dispatch
+ */
+
buf = iov_buf(talloc_tos(), iov, iovlen);
if (buf == NULL) {
return NT_STATUS_NO_MEMORY;
continue;
}
- if (messaging_is_self_send(msg_ctx, &rec->dest)) {
+ if (server_id_same_process(&rec->src, &rec->dest)) {
/*
* This is a self-send. We are called here from
* messaging_send(), and we don't want to directly