aboutsummaryrefslogtreecommitdiff
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)
downloadgnunet-dae4222c75b4879cf1524d4dc93bb6f023f468ca.tar.gz
gnunet-dae4222c75b4879cf1524d4dc93bb6f023f468ca.zip
-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)
360 /* write refers to reading from stdin, writing to fd_tun */ 360 /* write refers to reading from stdin, writing to fd_tun */
361 int write_open = 1; 361 int write_open = 1;
362 362
363 while ((1 == read_open) && (1 == write_open)) 363 while ((1 == read_open) || (1 == write_open))
364 { 364 {
365 FD_ZERO (&fds_w); 365 FD_ZERO (&fds_w);
366 FD_ZERO (&fds_r); 366 FD_ZERO (&fds_r);
@@ -412,7 +412,9 @@ run (int fd_tun)
412 MAX_SIZE - sizeof (struct GNUNET_MessageHeader)); 412 MAX_SIZE - sizeof (struct GNUNET_MessageHeader));
413 if (-1 == buftun_size) 413 if (-1 == buftun_size)
414 { 414 {
415 fprintf (stderr, "read-error: %s\n", strerror (errno)); 415 fprintf (stderr,
416 "read-error: %s\n",
417 strerror (errno));
416 shutdown (fd_tun, SHUT_RD); 418 shutdown (fd_tun, SHUT_RD);
417 shutdown (1, SHUT_WR); 419 shutdown (1, SHUT_WR);
418 read_open = 0; 420 read_open = 0;
@@ -445,7 +447,9 @@ run (int fd_tun)
445#if !DEBUG 447#if !DEBUG
446 if (errno != EPIPE) 448 if (errno != EPIPE)
447#endif 449#endif
448 fprintf (stderr, "write-error to stdout: %s\n", strerror (errno)); 450 fprintf (stderr,
451 "write-error to stdout: %s\n",
452 strerror (errno));
449 shutdown (fd_tun, SHUT_RD); 453 shutdown (fd_tun, SHUT_RD);
450 shutdown (1, SHUT_WR); 454 shutdown (1, SHUT_WR);
451 read_open = 0; 455 read_open = 0;
@@ -468,7 +472,9 @@ run (int fd_tun)
468 bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos); 472 bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos);
469 if (-1 == bufin_size) 473 if (-1 == bufin_size)
470 { 474 {
471 fprintf (stderr, "read-error: %s\n", strerror (errno)); 475 fprintf (stderr,
476 "read-error: %s\n",
477 strerror (errno));
472 shutdown (0, SHUT_RD); 478 shutdown (0, SHUT_RD);
473 shutdown (fd_tun, SHUT_WR); 479 shutdown (fd_tun, SHUT_WR);
474 write_open = 0; 480 write_open = 0;