aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-03-01 19:13:37 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-03-01 19:13:37 +0000
commit684f4e7212b4951b7e0d3888970a9fab53892344 (patch)
treea3be525c0489f109135cbde75b192108fdf5d9c6
parentadd9111ffe824f1321e759c2cfee8c6ad03709b8 (diff)
parent7271345efe182199acaeae602cb78a94a7c6dc9d (diff)
downloadslirp-684f4e7212b4951b7e0d3888970a9fab53892344.zip
slirp-684f4e7212b4951b7e0d3888970a9fab53892344.tar.gz
slirp-684f4e7212b4951b7e0d3888970a9fab53892344.tar.bz2
Merge branch 'macos-pri' into 'master'
Disable polling for PRI on MacOS Closes #35 See merge request slirp/libslirp!73
-rw-r--r--src/slirp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/slirp.c b/src/slirp.c
index c04d645..79ba734 100644
--- a/src/slirp.c
+++ b/src/slirp.c
@@ -718,10 +718,16 @@ void slirp_pollfds_poll(Slirp *slirp, int select_error,
continue;
}
+#ifndef __APPLE__
/*
* Check for URG data
* This will soread as well, so no need to
- * test for SLIRP_POLL_IN below if this succeeds
+ * test for SLIRP_POLL_IN below if this succeeds.
+ *
+ * This is however disabled on MacOS, which apparently always
+ * reports data as PRI when it is the last data of the
+ * connection. We would then report it out of band, which the guest
+ * would most probably not be ready for.
*/
if (revents & SLIRP_POLL_PRI) {
ret = sorecvoob(so);
@@ -734,8 +740,10 @@ void slirp_pollfds_poll(Slirp *slirp, int select_error,
/*
* Check sockets for reading
*/
- else if (revents &
- (SLIRP_POLL_IN | SLIRP_POLL_HUP | SLIRP_POLL_ERR)) {
+ else
+#endif
+ if (revents &
+ (SLIRP_POLL_IN | SLIRP_POLL_HUP | SLIRP_POLL_ERR | SLIRP_POLL_PRI)) {
/*
* Check for incoming connections
*/