nbd/client: Split out nbd_receive_one_meta_context()
commit0182c1aed9e6a9314023c7264c5c264da2f4a4ce
authorEric Blake <eblake@redhat.com>
Thu, 17 Jan 2019 19:36:49 +0000 (17 13:36 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 21 Jan 2019 21:49:52 +0000 (21 15:49 -0600)
tree4dac04b8a559a32756a6618ebf4a78a0c382d82b
parent757b3ab989dea1c3143dd0d499441415ac7fcbc0
nbd/client: Split out nbd_receive_one_meta_context()

Extract portions of nbd_negotiate_simple_meta_context() to
a new function nbd_receive_one_meta_context() that copies the
pattern of nbd_receive_list() for performing the argument
validation of one reply.  The error message when the server
replies with more than one context changes slightly, but
that shouldn't happen in the common case.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20190117193658.16413-13-eblake@redhat.com>
nbd/client.c
nbd/trace-events