From 1b8f3e66037b3cb59fec6c0fe778c8b3734b7093 Mon Sep 17 00:00:00 2001 From: John Levon Date: Tue, 4 May 2021 15:57:35 +0100 Subject: refactor message handling path (#376) Capture message handling inside a new vfu_msg_t private structure and pass that around to the handlers. This provides no functional change, but greatly simplifies and cleans up that path, especially around fd and iovec handling. As part of fixing up the unit tests, start using global variables to reduce the amount of boiler-plate. Signed-off-by: John Levon Reviewed-by: Thanos Makatos --- samples/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples/client.c') diff --git a/samples/client.c b/samples/client.c index 0647328..e27a323 100644 --- a/samples/client.c +++ b/samples/client.c @@ -434,7 +434,7 @@ static int access_region(int sock, int region, bool is_write, uint64_t offset, void *data, size_t data_len) { - static int msg_id = -1; + static int msg_id = 0xf00f; struct vfio_user_region_access send_region_access = { .offset = offset, .region = region, -- cgit v1.1