qemu/nbd
Daniel P. Berrange f72d705f0d nbd: invert client logic for negotiating protocol version
The nbd_receive_negotiate() method takes different code
paths based on whether 'name == NULL', and then checks
the expected protocol version in each branch.

This patch inverts the logic, so that it takes different
code paths based on what protocol version it receives and
then checks if name is NULL or not as needed.

This facilitates later code which allows the client to
be capable of using the new style protocol regardless
of whether an export name is listed or not.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1455129674-17255-8-git-send-email-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-02-16 17:14:08 +01:00
..
client.c nbd: invert client logic for negotiating protocol version 2016-02-16 17:14:08 +01:00
common.c nbd: convert to using I/O channels for actual socket I/O 2016-02-16 17:13:57 +01:00
Makefile.objs nbd: Split nbd.c 2016-01-15 18:58:02 +01:00
nbd-internal.h nbd: convert to using I/O channels for actual socket I/O 2016-02-16 17:13:57 +01:00
server.c nbd: convert to using I/O channels for actual socket I/O 2016-02-16 17:13:57 +01:00