nbd/server: nbd_negotiate: fix error path
commit7798d3aab981b1ccb29ba7343368a55a32a26d30
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 2 Jun 2017 15:01:47 +0000 (2 18:01 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:18:39 +0000 (15 11:18 +0200)
tree1ea60743e742ed6add752fb2a37f12e397d78823
parentc84087f2f52f6e87ad1cbd07e5502ab748c17039
nbd/server: nbd_negotiate: fix error path

Current code will return 0 on this nbd_write fail, as rc is 0
after successful nbd_negotiate_options. Fix this.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170602150150.258222-10-vsementsov@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd/server.c