gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r19292 - in gnunet/src: dns exit util


From: gnunet
Subject: [GNUnet-SVN] r19292 - in gnunet/src: dns exit util
Date: Fri, 20 Jan 2012 18:47:07 +0100

Author: grothoff
Date: 2012-01-20 18:47:07 +0100 (Fri, 20 Jan 2012)
New Revision: 19292

Modified:
   gnunet/src/dns/gnunet-helper-dns.c
   gnunet/src/exit/gnunet-daemon-exit.c
   gnunet/src/exit/gnunet-helper-exit.c
   gnunet/src/util/server_mst.c
Log:
-fix getting output from sysctl into service-helper interactions

Modified: gnunet/src/dns/gnunet-helper-dns.c
===================================================================
--- gnunet/src/dns/gnunet-helper-dns.c  2012-01-20 17:21:21 UTC (rev 19291)
+++ gnunet/src/dns/gnunet-helper-dns.c  2012-01-20 17:47:07 UTC (rev 19292)
@@ -173,6 +173,10 @@
   if (0 == pid)
   {
     /* we are the child process */
+    /* close stdin/stdout to not cause interference
+       with the helper's main protocol! */
+    (void) close (0); 
+    (void) close (1); 
     (void) execv (file, cmd);
     /* can only get here on error */
     fprintf (stderr, 

Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c        2012-01-20 17:21:21 UTC (rev 
19291)
+++ gnunet/src/exit/gnunet-daemon-exit.c        2012-01-20 17:47:07 UTC (rev 
19292)
@@ -678,7 +678,7 @@
                           sbuf, sizeof (sbuf)),
                (unsigned int) ntohs (tcp->spt),
                inet_ntop (af,
-                          source_ip,
+                          destination_ip,
                           dbuf, sizeof (dbuf)),
                (unsigned int) ntohs (tcp->dpt));
   }
@@ -745,6 +745,10 @@
   const struct GNUNET_TUN_Layer2PacketHeader *pkt_tun;
   size_t size;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Got %u-byte message of type %u from gnunet-helper-exit\n",
+             ntohs (message->size),
+             ntohs (message->type));
   GNUNET_STATISTICS_update (stats,
                            gettext_noop ("# Packets received from TUN"),
                            1, GNUNET_NO);

Modified: gnunet/src/exit/gnunet-helper-exit.c
===================================================================
--- gnunet/src/exit/gnunet-helper-exit.c        2012-01-20 17:21:21 UTC (rev 
19291)
+++ gnunet/src/exit/gnunet-helper-exit.c        2012-01-20 17:47:07 UTC (rev 
19292)
@@ -110,6 +110,10 @@
   if (0 == pid)
   {
     /* we are the child process */
+    /* close stdin/stdout to not cause interference
+       with the helper's main protocol! */
+    (void) close (0); 
+    (void) close (1); 
     (void) execv (file, cmd);
     /* can only get here on error */
     fprintf (stderr, 

Modified: gnunet/src/util/server_mst.c
===================================================================
--- gnunet/src/util/server_mst.c        2012-01-20 17:21:21 UTC (rev 19291)
+++ gnunet/src/util/server_mst.c        2012-01-20 17:47:07 UTC (rev 19292)
@@ -31,7 +31,7 @@
 #include "gnunet_server_lib.h"
 #include "gnunet_time_lib.h"
 
-#define DEBUG_SERVER_MST GNUNET_EXTRA_LOGGING
+#define DEBUG_SERVER_MST GNUNET_EXTRA_LOGGING 
 
 #if HAVE_UNALIGNED_64_ACCESS
 #define ALIGN_FACTOR 4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]