aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-26 15:04:57 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-26 15:04:57 +0000
commit618e34685314ca8a8e9830259c0a17bfe1315cfa (patch)
tree052fcc545adafbb8f0d5fc698a0b14f44bb25617
parent5b1a20db208f089a720c814b5551a56a8f7bdf89 (diff)
-exit helper when either direction breaks
-rw-r--r--src/exit/gnunet-helper-exit.c2
-rw-r--r--src/vpn/gnunet-helper-vpn.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c
index 55a98596a0..e68c10c330 100644
--- a/src/exit/gnunet-helper-exit.c
+++ b/src/exit/gnunet-helper-exit.c
@@ -451,7 +451,7 @@ run (int fd_tun)
/* write refers to reading from stdin, writing to fd_tun */
int write_open = 1;
- while ((1 == read_open) || (1 == write_open))
+ while ((1 == read_open) && (1 == write_open))
{
FD_ZERO (&fds_w);
FD_ZERO (&fds_r);
diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c
index 62696a5454..5231c1657a 100644
--- a/src/vpn/gnunet-helper-vpn.c
+++ b/src/vpn/gnunet-helper-vpn.c
@@ -360,7 +360,7 @@ run (int fd_tun)
/* write refers to reading from stdin, writing to fd_tun */
int write_open = 1;
- while ((1 == read_open) || (1 == write_open))
+ while ((1 == read_open) && (1 == write_open))
{
FD_ZERO (&fds_w);
FD_ZERO (&fds_r);