s3/lib/ctdbd_conn: assert hdr following read/recv
commit9173ae5f7f02d2f1675d505ee3da7e62cceeafd0
authorDavid Disseldorp <ddiss@samba.org>
Tue, 3 Sep 2019 13:26:19 +0000 (3 15:26 +0200)
committerNoel Power <npower@samba.org>
Wed, 4 Sep 2019 14:20:16 +0000 (4 14:20 +0000)
treea42d250df7c81ba4ed0225f002ff3c09c05fd575
parent123267138e993c6a87990c0022e89f4970c0ac12
s3/lib/ctdbd_conn: assert hdr following read/recv

ctdb_pkt_recv_recv() and ctdb_read_packet() give us a non-null hdr on
success, so drop the error path check in favour of an assert.

This fixes a regression in 3913b9a4088b83d6ed7f94d136a26ecfa7e16b35,
where tevent_req_error() may be skipped in the ctdbd_parse_done()
ctdb_pkt_recv_recv() error path.

Reported-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Sep  4 14:20:16 UTC 2019 on sn-devel-184
source3/lib/ctdbd_conn.c