mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-client: Use ctdb_ltdb_header_extract()
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
0ed60d757d
commit
e59712b2c3
@ -591,19 +591,13 @@ static int ctdb_db_traverse_handler(struct tdb_context *tdb, TDB_DATA key,
|
|||||||
|
|
||||||
if (state->extract_header) {
|
if (state->extract_header) {
|
||||||
struct ctdb_ltdb_header header;
|
struct ctdb_ltdb_header header;
|
||||||
size_t len;
|
|
||||||
|
|
||||||
ret = ctdb_ltdb_header_pull(data.dptr, data.dsize, &header);
|
ret = ctdb_ltdb_header_extract(&data, &header);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
state->error = ret;
|
state->error = ret;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = ctdb_ltdb_header_len(&header);
|
|
||||||
|
|
||||||
data.dptr += len;
|
|
||||||
data.dsize -= len;
|
|
||||||
|
|
||||||
ret = state->parser(0, &header, key, data, state->private_data);
|
ret = state->parser(0, &header, key, data, state->private_data);
|
||||||
} else {
|
} else {
|
||||||
ret = state->parser(0, NULL, key, data, state->private_data);
|
ret = state->parser(0, NULL, key, data, state->private_data);
|
||||||
|
Loading…
Reference in New Issue
Block a user