diff options
author | Amitay Isaacs <amitay@gmail.com> | 2017-06-29 22:39:41 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-08-30 14:59:22 +0200 |
commit | 25217a9bb58c05102655567995a8b32690ef405a (patch) | |
tree | c54e14f86d9e842e483cf598a0caedd7a8695b5d /ctdb/tools | |
parent | 04d0b30592385ea70f2f1a6f268bfed5536e59ea (diff) | |
download | samba-25217a9bb58c05102655567995a8b32690ef405a.tar.gz |
ctdb-protocol: Fix marshalling for ctdb_ltdb_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/tools')
-rw-r--r-- | ctdb/tools/ctdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 1ed6f6128cd..e506162d44b 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -5281,6 +5281,7 @@ static int control_tstore(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, TDB_DATA key, data[2], value; struct ctdb_ltdb_header header; uint8_t header_buf[sizeof(struct ctdb_ltdb_header)]; + size_t np; int ret; if (argc < 3 || argc > 5) { @@ -5319,9 +5320,9 @@ static int control_tstore(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, header.flags = (uint32_t)atol(argv[5]); } - ctdb_ltdb_header_push(&header, header_buf); + ctdb_ltdb_header_push(&header, header_buf, &np); - data[0].dsize = ctdb_ltdb_header_len(&header); + data[0].dsize = np; data[0].dptr = header_buf; data[1].dsize = value.dsize; |