[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 02/70: Fix polling pfinet tun for write
From: |
Samuel Thibault |
Subject: |
[hurd] 02/70: Fix polling pfinet tun for write |
Date: |
Mon, 16 Sep 2013 07:41:34 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 25a628b3403249499ba3f87ab177c441c8f432ee
Author: Samuel Thibault <address@hidden>
Date: Fri Aug 23 15:51:37 2013 +0200
Fix polling pfinet tun for write
* pfinet/tunnel.c (io_select_common): Also handle `SELECT_WRITE' case.
---
pfinet/tunnel.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/pfinet/tunnel.c b/pfinet/tunnel.c
index 4a6f616..495356c 100644
--- a/pfinet/tunnel.c
+++ b/pfinet/tunnel.c
@@ -479,14 +479,23 @@ io_select_common (struct trivfs_protid *cred,
tdev = (struct tunnel_device *) cred->po->cntl->hook;
- /* We only deal with SELECT_READ here. */
- *type &= SELECT_READ;
+ /* We only deal with SELECT_READ and SELECT_WRITE here. */
+ *type &= SELECT_READ | SELECT_WRITE;
if (*type == 0)
return 0;
pthread_mutex_lock (&tdev->lock);
+ if (*type & SELECT_WRITE)
+ {
+ /* We are always writable. */
+ if (skb_queue_len (&tdev->xq) == 0)
+ *type &= ~SELECT_READ;
+ pthread_mutex_unlock (&tdev->lock);
+ return 0;
+ }
+
while (1)
{
if (skb_queue_len (&tdev->xq) != 0)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 08/70: mount: implement -O, --test-opts, (continued)
- [hurd] 08/70: mount: implement -O, --test-opts, Samuel Thibault, 2013/09/16
- [hurd] 07/70: mount: add -f and --fake arguments, Samuel Thibault, 2013/09/16
- [hurd] 11/70: sutils: fix the semantic of -t, --types in fstab.c, Samuel Thibault, 2013/09/16
- [hurd] 42/70: trans: register symlink translators as important, Samuel Thibault, 2013/09/16
- [hurd] 33/70: Reserve RPC ID for proc_set_init_task, Samuel Thibault, 2013/09/16
- [hurd] 06/70: mount: fix mount -oremount with one parameter, Samuel Thibault, 2013/09/16
- [hurd] 04/70: utils: escape arguments in remap.sh, Samuel Thibault, 2013/09/16
- [hurd] 30/70: umount: add a umount utility, Samuel Thibault, 2013/09/16
- [hurd] 32/70: Merge branch 'master-merge', Samuel Thibault, 2013/09/16
- [hurd] 28/70: libnetfs: implement file_get_translator_cntl, Samuel Thibault, 2013/09/16
- [hurd] 02/70: Fix polling pfinet tun for write,
Samuel Thibault <=
- [hurd] 69/70: Large store support for ext2fs, Samuel Thibault, 2013/09/16
- [hurd] 01/70: config.make: Use more configure settings when building xkb-data, Samuel Thibault, 2013/09/16
- [hurd] 09/70: mount: ignore mounted filesystems if --all is given, Samuel Thibault, 2013/09/16
- [hurd] 05/70: mount: add -n and --no-mtab arguments, Samuel Thibault, 2013/09/16
- [hurd] 29/70: libnetfs: handle dead-name notifications, Samuel Thibault, 2013/09/16
- [hurd] 16/70: Add configure checks for libdaemon, Samuel Thibault, 2013/09/16
- [hurd] 37/70: init: Mark all of inits children and init itself as important, Samuel Thibault, 2013/09/16
- [hurd] 57/70: libtrivfs: add fsys_get_children, Samuel Thibault, 2013/09/16
- [hurd] 61/70: libnetfs: add fsys_get_source, Samuel Thibault, 2013/09/16