msg: fixup for
2ffacbe (crc configuration in messenger)
* Update the remaining Message::encode() calls, which now expect crc
flags to be passed as a flags parameter instead of a bool (this e.g.
fixes the issue with routing messages forwarded from an older client).
* In Message::encode() data crc is calculated when MSG_CRC_DATA is
set, but in decode_message(), Pipe::read/write_message() data crc is
calculated when MSG_CRC_HEADER is set. Fix this.
Note,
2ffacbe changed the behavior of Pipe::read_message/write_message():
previously the methods always calculated crc, now they calculate it
only if crc is enabled in the config. This means crc can not be disabled
if there are monitors of older version in the cluster.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Sage Weil <sage@redhat.com>