qemu/nbd
Vladimir Sementsov-Ogievskiy f155487bef 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>
(cherry picked from commit 89aa0d8763)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2018-07-11 11:48:21 -05:00
..
client.c nbd/client: fix nbd_negotiate_simple_meta_context 2018-07-11 11:48:21 -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