smbd: Slightly simplify notifyd_send_delete()
authorVolker Lendecke <vl@samba.org>
Tue, 27 Feb 2024 14:32:59 +0000 (15:32 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 23 Apr 2024 17:53:36 +0000 (17:53 +0000)
Call messaging_send_iov() instead of messaging_send_iov_from().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/notifyd/notifyd.c

index 4af62a9a1f9ef6a202ebc7bf32d7157a9f244054..64dd26a7e11d10281b1ca2552fc9c746dd8b5142 100644 (file)
@@ -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));
        }
 }