aboutsummaryrefslogtreecommitdiffstats
path: root/vhost_user_loopback.c
diff options
context:
space:
mode:
Diffstat (limited to 'vhost_user_loopback.c')
-rw-r--r--vhost_user_loopback.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vhost_user_loopback.c b/vhost_user_loopback.c
index 8ea366f..91e2efb 100644
--- a/vhost_user_loopback.c
+++ b/vhost_user_loopback.c
@@ -465,7 +465,15 @@ void vhost_user_share_fd(void)
* msg.flags &= ~VHOST_USER_NEED_REPLY_MASK;
*/
- (void)vu_message_write(client_sock, &msg);
+ if (vu_message_write(client_sock, &msg) < 0) {
+ DBG("vhost_user_share_fd -> write failed\n");
+ exit(1);
+ }
+
+ if (msg.flags & VHOST_USER_NEED_REPLY_MASK) {
+ process_message_reply(&msg);
+ }
+
}
int vhost_set_vring_file(VhostUserRequest request,