From 316579b5029823ba19eda2a131a3a2a5df7419a1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 27 Feb 2024 15:32:59 +0100 Subject: [PATCH] smbd: Slightly simplify notifyd_send_delete() Call messaging_send_iov() instead of messaging_send_iov_from(). Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/notifyd/notifyd.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source3/smbd/notifyd/notifyd.c b/source3/smbd/notifyd/notifyd.c index 4af62a9a1f9..64dd26a7e11 100644 --- a/source3/smbd/notifyd/notifyd.c +++ b/source3/smbd/notifyd/notifyd.c @@ -790,7 +790,7 @@ static void notifyd_send_delete(struct messaging_context *msg_ctx, }; uint8_t nul = 0; struct iovec iov[3]; - int ret; + NTSTATUS status; /* * Send a rec_change to ourselves to delete a dead entry @@ -802,13 +802,17 @@ static void notifyd_send_delete(struct messaging_context *msg_ctx, iov[1] = (struct iovec) { .iov_base = key.dptr, .iov_len = key.dsize }; iov[2] = (struct iovec) { .iov_base = &nul, .iov_len = sizeof(nul) }; - ret = messaging_send_iov_from( - msg_ctx, instance->client, messaging_server_id(msg_ctx), - MSG_SMB_NOTIFY_REC_CHANGE, iov, ARRAY_SIZE(iov), NULL, 0); + status = messaging_send_iov(msg_ctx, + instance->client, + MSG_SMB_NOTIFY_REC_CHANGE, + iov, + ARRAY_SIZE(iov), + NULL, + 0); - if (ret != 0) { - DBG_WARNING("messaging_send_iov_from returned %s\n", - strerror(ret)); + if (!NT_STATUS_IS_OK(status)) { + DBG_WARNING("messaging_send_iov failed: %s\n", + nt_errstr(status)); } } -- 2.11.4.GIT