diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-01-25 17:33:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 17:33:13 +0000 |
commit | 915a5b01f34a61cacef5ae5b50a215d13628b8b0 (patch) | |
tree | 6282c7f27790a44ed5787a5f288188e748f41a5e /samples/client.c | |
parent | 5f2fa524cd587762bd63cfc6d1594dfd4a956272 (diff) | |
download | libvfio-user-915a5b01f34a61cacef5ae5b50a215d13628b8b0.zip libvfio-user-915a5b01f34a61cacef5ae5b50a215d13628b8b0.tar.gz libvfio-user-915a5b01f34a61cacef5ae5b50a215d13628b8b0.tar.bz2 |
don't assume specific message ID when negotiating (#248)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r-- | samples/client.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/samples/client.c b/samples/client.c index 60b245f..18558b8 100644 --- a/samples/client.c +++ b/samples/client.c @@ -130,12 +130,10 @@ recv_version(int sock, int *server_max_fds, size_t *pgsize) { struct vfio_user_version *sversion = NULL; struct vfio_user_header hdr; - uint16_t msg_id = 0; size_t vlen; int ret; - ret = vfu_recv_alloc(sock, &hdr, true, &msg_id, - (void **)&sversion, &vlen); + ret = vfu_recv_alloc(sock, &hdr, true, NULL, (void **)&sversion, &vlen); if (ret < 0) { errx(EXIT_FAILURE, "failed to receive version: %s", strerror(-ret)); @@ -150,8 +148,7 @@ recv_version(int sock, int *server_max_fds, size_t *pgsize) #endif if (vlen < sizeof (*sversion)) { - errx(EXIT_FAILURE, "msg%hx (VFIO_USER_VERSION): invalid size %lu", - msg_id, vlen); + errx(EXIT_FAILURE, "VFIO_USER_VERSION: invalid size %lu", vlen); } if (sversion->major != LIB_VFIO_USER_MAJOR) { |