Refactor the negotiate() and connected functionsmaster
commit17043b068f4323078637314258158aebbfff0a6c
authorWouter Verhelst <w@uter.be>
Sat, 28 Sep 2024 11:24:44 +0000 (28 13:24 +0200)
committerWouter Verhelst <w@uter.be>
Sat, 28 Sep 2024 11:28:49 +0000 (28 13:28 +0200)
tree96f82da902f78abc7c72e0f9acac6f136f5cb0de
parent82c500fac5003c0f7448cebe7805fb083322724e
Refactor the negotiate() and connected functions

Having a gazillion arguments to negotiate is unwieldy and
unmaintainable. Use the CLIENT type to handle parsed stuff instead.

Originally we were going to pass a pointer to a CLIENT, but we need to
keep the cur_client global variable for config file parsing, so might
as well reuse that.

Not so clean, so we might revisit this in the future, but at least this
reduces complexity somewhat.

Signed-off-by: Wouter Verhelst <w@uter.be>
nbd-client.c