dbwrap: Slightly simplify dbwrap_watch_record_stored
authorVolker Lendecke <vl@samba.org>
Wed, 12 Feb 2014 12:48:19 +0000 (12:48 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 25 Feb 2014 22:27:21 +0000 (23:27 +0100)
We have messaging_send_buf, so there's no point to use an explicit
DATA_BLOB here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb 25 23:27:21 CET 2014 on sn-devel-104

source3/lib/dbwrap/dbwrap_watch.c

index ba4381e045b0328ecc9708405814406b909731a3..4f3a2b3f059592c870e5a028bdf3f134cd6d195d 100644 (file)
@@ -307,7 +307,6 @@ static void dbwrap_watch_record_stored(struct db_context *db,
        struct server_id *ids = NULL;
        size_t num_ids = 0;
        TDB_DATA w_key = { 0, };
-       DATA_BLOB w_blob;
        NTSTATUS status;
        uint32_t i;
 
@@ -326,12 +325,10 @@ static void dbwrap_watch_record_stored(struct db_context *db,
                DEBUG(1, ("dbwrap_record_watchers_key failed\n"));
                goto done;
        }
-       w_blob.data = w_key.dptr;
-       w_blob.length = w_key.dsize;
 
        for (i=0; i<num_ids; i++) {
-               status = messaging_send(msg, ids[i], MSG_DBWRAP_MODIFIED,
-                                       &w_blob);
+               status = messaging_send_buf(msg, ids[i], MSG_DBWRAP_MODIFIED,
+                                           w_key.dptr, w_key.dsize);
                if (!NT_STATUS_IS_OK(status)) {
                        char *str = procid_str_static(&ids[i]);
                        DEBUG(1, ("messaging_send to %s failed: %s\n",