qemu/nbd
Vladimir Sementsov-Ogievskiy 89aa0d8763 nbd/client: fix nbd_negotiate_simple_meta_context
Initialize received variable. Otherwise, is is possible for server to
answer without any contexts, but we will set context_id to something
random (received_id is not initialized too) and return 1, which is
wrong.

To solve it, just initialize received to false. Initialize received_id
too, just to make all possible checkers happy.

Bug was introduced in 78a33ab587 "nbd: BLOCK_STATUS for
standard get_block_status function: client part" with the whole
function.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20180427142002.21930-2-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
2018-05-04 08:23:07 -05:00
..
client.c nbd/client: fix nbd_negotiate_simple_meta_context 2018-05-04 08:23:07 -05:00
common.c nbd: BLOCK_STATUS constants 2018-03-01 14:05:24 -06:00
Makefile.objs
nbd-internal.h nbd: Minimal structured read for client 2017-10-30 21:48:41 +01:00
server.c nbd: trace meta context negotiation 2018-04-02 09:10:49 -05:00
trace-events nbd: trace meta context negotiation 2018-04-02 09:10:49 -05:00