ctdb-client: Use ctdb_rec_buffer_init() to initialize ctdb_rec_buffer
authorAmitay Isaacs <amitay@gmail.com>
Fri, 6 Nov 2015 06:08:18 +0000 (17:08 +1100)
committerMartin Schwenke <martins@samba.org>
Wed, 20 Jan 2016 06:28:42 +0000 (07:28 +0100)
... instead of talloc_zero().  This sets the db_id correctly.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jan 20 07:28:42 CET 2016 on sn-devel-144

ctdb/client/client_db.c

index 1086b0e14e64b0c08da10662d25f81e32f3249c1..287efd6cad881fa9f7c8120ef41e8934b47fa410 100644 (file)
@@ -1624,7 +1624,7 @@ struct tevent_req *ctdb_transaction_start_send(TALLOC_CTX *mem_ctx,
        h->sid.unique_id = h->sid.task_id;
        h->sid.unique_id = (h->sid.unique_id << 32) | h->sid.pid;
 
-       h->recbuf = talloc_zero(h, struct ctdb_rec_buffer);
+       h->recbuf = ctdb_rec_buffer_init(h, db->db_id);
        if (tevent_req_nomem(h->recbuf, req)) {
                return tevent_req_post(req, ev);
        }