ctdb-protocol: Fix marshalling for GET_DB_SEQNUM control
authorAmitay Isaacs <amitay@gmail.com>
Wed, 26 Jul 2017 15:15:34 +0000 (01:15 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 30 Aug 2017 12:59:21 +0000 (14:59 +0200)
commitc16d2585bc8af01225c3b8903bb261196461f25f
treeef3db4d2879a6598d3ecfa6d89f5e19a90827e99
parent936fc23e3c9d54898565b0093de10077d82ba1f8
ctdb-protocol: Fix marshalling for GET_DB_SEQNUM control

In the control request, database id which is a 32-bit integer is sent
on wire as a 64-bit integer rather than a 32-bit integer.  If we
convert the database id to 64-bit integer before sending, the order of
32-bits with database id will vary depending on the endian-ness.

Instead send the database id as first 32-bits and zeros as next 32-bits.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/ctdb_client.c
ctdb/protocol/protocol_control.c