fix vhost-user restore implementation
It was using the wrong union member, causing an off by one error.
Somehow missed this when testing https://r.android.com/2794978, I
probably forgot to rebuild before testing when doing the final
polishing.
Bug: 295028005
Test: do CF snapshot/restore flow with wifi enabled
Change-Id: I2ff07f6f5045d875c80a37b8f15148563714c340
diff --git a/wmediumd/lib/vhost.c b/wmediumd/lib/vhost.c
index 4e13012..dbb721b 100644
--- a/wmediumd/lib/vhost.c
+++ b/wmediumd/lib/vhost.c
@@ -741,7 +741,7 @@
usfstl_vhost_user_get_msg_fds(&msghdr, fds, 2);
for (virtq = 0; virtq < dev->ext.server->max_queues; virtq++) {
- const struct vring_snapshot* snapshot = &msg.payload.snapshot_response.snapshot.vrings[virtq];
+ const struct vring_snapshot* snapshot = &msg.payload.restore_request.snapshot.vrings[virtq];
dev->virtqs[virtq].enabled = snapshot->enabled;
dev->virtqs[virtq].sleeping = snapshot->sleeping;
dev->virtqs[virtq].triggered = snapshot->triggered;