aboutsummaryrefslogtreecommitdiff
path: root/lib/tran_sock.c
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2021-01-28 21:04:19 +0000
committerGitHub <noreply@github.com>2021-01-28 21:04:19 +0000
commitd83300a9a5e3dda56a38cd55b995ccaa00f3188a (patch)
tree72a041ba88875084714767cec888970ad975e41d /lib/tran_sock.c
parent45d383c981d60cc7dae5c3a62dc37139a5f465e8 (diff)
downloadlibvfio-user-d83300a9a5e3dda56a38cd55b995ccaa00f3188a.zip
libvfio-user-d83300a9a5e3dda56a38cd55b995ccaa00f3188a.tar.gz
libvfio-user-d83300a9a5e3dda56a38cd55b995ccaa00f3188a.tar.bz2
use unique errno when recv msg ID doesn't match (#280)
This is simply to make debugging easier. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/tran_sock.c')
-rw-r--r--lib/tran_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tran_sock.c b/lib/tran_sock.c
index e798cec..b155b69 100644
--- a/lib/tran_sock.c
+++ b/lib/tran_sock.c
@@ -292,7 +292,7 @@ vfu_recv_fds(int sock, struct vfio_user_header *hdr, bool is_reply,
if (is_reply) {
if (msg_id != NULL && hdr->msg_id != *msg_id) {
- return -EINVAL;
+ return -EPROTO;
}
if (hdr->flags.type != VFIO_USER_F_TYPE_REPLY) {