aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-helper-vpn.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-25 20:15:58 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-25 20:15:58 +0000
commit9935d917ca2a9a34e9c6d1aa744744eaeb6dfd2e (patch)
tree763e2277ebd969d896c63d3735d82c7222518074 /src/vpn/gnunet-helper-vpn.c
parent1f1cee05703360688308f3a6cfab40673b891989 (diff)
downloadgnunet-9935d917ca2a9a34e9c6d1aa744744eaeb6dfd2e.tar.gz
gnunet-9935d917ca2a9a34e9c6d1aa744744eaeb6dfd2e.zip
-terminate test after a while, check for SUID helper
Diffstat (limited to 'src/vpn/gnunet-helper-vpn.c')
-rw-r--r--src/vpn/gnunet-helper-vpn.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c
index a6035d1d1..77512832d 100644
--- a/src/vpn/gnunet-helper-vpn.c
+++ b/src/vpn/gnunet-helper-vpn.c
@@ -45,6 +45,12 @@
45#include "gnunet_protocols.h" 45#include "gnunet_protocols.h"
46 46
47/** 47/**
48 * Should we print (interesting|debug) messages that can happen during
49 * normal operation?
50 */
51#define DEBUG GNUNET_NO
52
53/**
48 * Maximum size of a GNUnet message (GNUNET_SERVER_MAX_MESSAGE_SIZE) 54 * Maximum size of a GNUnet message (GNUNET_SERVER_MAX_MESSAGE_SIZE)
49 */ 55 */
50#define MAX_SIZE 65536 56#define MAX_SIZE 65536
@@ -420,7 +426,10 @@ run (int fd_tun)
420 426
421 if (-1 == written) 427 if (-1 == written)
422 { 428 {
423 fprintf (stderr, "write-error to stdout: %s\n", strerror (errno)); 429#if !DEBUG
430 if (errno != EPIPE)
431#endif
432 fprintf (stderr, "write-error to stdout: %s\n", strerror (errno));
424 shutdown (fd_tun, SHUT_RD); 433 shutdown (fd_tun, SHUT_RD);
425 shutdown (1, SHUT_WR); 434 shutdown (1, SHUT_WR);
426 read_open = 0; 435 read_open = 0;
@@ -451,7 +460,9 @@ run (int fd_tun)
451 } 460 }
452 else if (0 == bufin_size) 461 else if (0 == bufin_size)
453 { 462 {
463#if DEBUG
454 fprintf (stderr, "EOF on stdin\n"); 464 fprintf (stderr, "EOF on stdin\n");
465#endif
455 shutdown (0, SHUT_RD); 466 shutdown (0, SHUT_RD);
456 shutdown (fd_tun, SHUT_WR); 467 shutdown (fd_tun, SHUT_WR);
457 write_open = 0; 468 write_open = 0;