summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2018-01-11 00:08:21 +0100
committerEric Blake2018-01-18 03:14:12 +0100
commit0cfae925d2e31a7d7613a6fb60aa58b38ec2b61e (patch)
treee387b106a4fd4d94397f4cec7017be81129e9486 /include/exec
parentnbd/server: Hoist nbd_reject_length() earlier (diff)
downloadqemu-0cfae925d2e31a7d7613a6fb60aa58b38ec2b61e.tar.gz
qemu-0cfae925d2e31a7d7613a6fb60aa58b38ec2b61e.tar.xz
qemu-0cfae925d2e31a7d7613a6fb60aa58b38ec2b61e.zip
nbd/server: refactor negotiation functions parameters
Instead of passing currently negotiating option and its length to many of negotiation functions let's just store them on NBDClient struct to be state-variables of negotiation phase. This unifies semantics of negotiation functions and allows tracking changes of remaining option length in future patches. Asssert that optlen is back to 0 after negotiation (including old-style connections which don't negotiate), although we need more patches before we can assert optlen is 0 between options during negotiation. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20171122101958.17065-2-vsementsov@virtuozzo.com> [eblake: rebase, commit message tweak, assert !optlen after negotiation completes] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions