summaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-26 15:23:33 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-26 15:23:33 +0000
commitdae4222c75b4879cf1524d4dc93bb6f023f468ca (patch)
tree73d9c5fb8009b8351d66e8b7f5a7093e7b202fd5 /src/vpn
parent98400554f939e0b318bdfd4c80fd13e7c89128d6 (diff)
-indentation
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/gnunet-helper-vpn.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c
index 5231c1657..3bf0704f9 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);
@@ -412,7 +412,9 @@ run (int fd_tun)
MAX_SIZE - sizeof (struct GNUNET_MessageHeader));
if (-1 == buftun_size)
{
- fprintf (stderr, "read-error: %s\n", strerror (errno));
+ fprintf (stderr,
+ "read-error: %s\n",
+ strerror (errno));
shutdown (fd_tun, SHUT_RD);
shutdown (1, SHUT_WR);
read_open = 0;
@@ -445,7 +447,9 @@ run (int fd_tun)
#if !DEBUG
if (errno != EPIPE)
#endif
- fprintf (stderr, "write-error to stdout: %s\n", strerror (errno));
+ fprintf (stderr,
+ "write-error to stdout: %s\n",
+ strerror (errno));
shutdown (fd_tun, SHUT_RD);
shutdown (1, SHUT_WR);
read_open = 0;
@@ -468,7 +472,9 @@ run (int fd_tun)
bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos);
if (-1 == bufin_size)
{
- fprintf (stderr, "read-error: %s\n", strerror (errno));
+ fprintf (stderr,
+ "read-error: %s\n",
+ strerror (errno));
shutdown (0, SHUT_RD);
shutdown (fd_tun, SHUT_WR);
write_open = 0;