gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24693 - in gnunet/src: arm ats chat core datastore dht dns


From: gnunet
Subject: [GNUnet-SVN] r24693 - in gnunet/src: arm ats chat core datastore dht dns dv fragmentation fs gns hello hostlist include integration-tests integration-tests/confs lockmanager mesh namestore nat nse peerinfo peerinfo-tool pt regex statistics stream template testbed testing testing_old topology transport util vpn
Date: Sun, 4 Nov 2012 22:01:22 +0100

Author: grothoff
Date: 2012-11-04 22:01:22 +0100 (Sun, 04 Nov 2012)
New Revision: 24693

Modified:
   gnunet/src/arm/gnunet-arm.c
   gnunet/src/arm/test_arm_api_data.conf
   gnunet/src/arm/test_exponential_backoff.c
   gnunet/src/ats/gnunet-service-ats_addresses.c
   gnunet/src/ats/perf_ats_mlp.c
   gnunet/src/ats/test_ats_api.conf
   gnunet/src/ats/test_ats_api_update_address.c
   gnunet/src/chat/test_chat.c
   gnunet/src/chat/test_chat_private.c
   gnunet/src/core/core.conf.in
   gnunet/src/core/test_core_api.c
   gnunet/src/core/test_core_api_reliability.c
   gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf
   gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf
   gnunet/src/core/test_core_quota_asymmetric_send_limit_peer1.conf
   gnunet/src/core/test_core_quota_asymmetric_send_limit_peer2.conf
   gnunet/src/core/test_core_quota_compliance.c
   gnunet/src/core/test_core_quota_peer1.conf
   gnunet/src/core/test_core_quota_peer2.conf
   gnunet/src/datastore/test_plugin_datastore.c
   gnunet/src/dht/dht.conf.in
   gnunet/src/dht/test_dht_api_data.conf
   gnunet/src/dht/test_dht_api_peer1.conf
   gnunet/src/dns/gnunet-dns-monitor.c
   gnunet/src/dns/gnunet-dns-redirector.c
   gnunet/src/dv/dv.conf.in
   gnunet/src/dv/test_transport_api_dv.c
   gnunet/src/dv/test_transport_dv_data.conf
   gnunet/src/fragmentation/test_fragmentation.c
   gnunet/src/fs/fs.conf.in
   gnunet/src/fs/gnunet-auto-share.c
   gnunet/src/fs/gnunet-directory.c
   gnunet/src/fs/gnunet-download.c
   gnunet/src/fs/gnunet-fs.c
   gnunet/src/fs/gnunet-helper-fs-publish.c
   gnunet/src/fs/gnunet-pseudonym.c
   gnunet/src/fs/gnunet-publish.c
   gnunet/src/fs/gnunet-search.c
   gnunet/src/fs/gnunet-unindex.c
   gnunet/src/gns/gnunet-dns2gns.c
   gnunet/src/gns/gnunet-gns-fcfsd.c
   gnunet/src/gns/gnunet-gns.c
   gnunet/src/gns/test_gns_dht_default.conf
   gnunet/src/gns/test_gns_simple_lookup.conf
   gnunet/src/gns/w32nsp-resolve.c
   gnunet/src/hello/gnunet-hello.c
   gnunet/src/hello/test_hello.c
   gnunet/src/hostlist/gnunet-daemon-hostlist.c
   gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
   gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
   gnunet/src/hostlist/test_hostlist_defaults.conf
   gnunet/src/include/platform.h
   gnunet/src/integration-tests/confs/c_no_nat_client.conf
   gnunet/src/integration-tests/confs/c_no_nat_client_http.conf
   gnunet/src/integration-tests/confs/c_no_nat_client_unix.conf
   gnunet/src/integration-tests/connection_watchdog.c
   gnunet/src/lockmanager/test_lockmanager_api.conf
   gnunet/src/mesh/gnunet-regex-profiler.c
   gnunet/src/mesh/regex_profiler_test.conf
   gnunet/src/mesh/test_mesh.conf
   gnunet/src/mesh/test_mesh_2dtorus.c
   gnunet/src/mesh/test_mesh_2dtorus.conf
   gnunet/src/mesh/test_mesh_path.conf
   gnunet/src/mesh/test_mesh_regex.c
   gnunet/src/mesh/test_mesh_small.c
   gnunet/src/mesh/test_mesh_small.conf
   gnunet/src/mesh/test_mesh_tree_api.c
   gnunet/src/namestore/gnunet-namestore.c
   gnunet/src/namestore/namestore_api.c
   gnunet/src/namestore/test_namestore_record_serialization.c
   gnunet/src/nat/gnunet-nat-server.c
   gnunet/src/nat/test_nat_mini.c
   gnunet/src/nse/nse_profiler_test.conf
   gnunet/src/nse/test_nse.conf
   gnunet/src/peerinfo-tool/gnunet-peerinfo.c
   gnunet/src/peerinfo/test_peerinfo_api_data.conf
   gnunet/src/pt/gnunet-daemon-pt.c
   gnunet/src/regex/test_regex_graph_api.c
   gnunet/src/statistics/gnunet-statistics.c
   gnunet/src/statistics/test_statistics_api_data.conf
   gnunet/src/stream/test_stream_2peers_halfclose.c
   gnunet/src/stream/test_stream_local.conf
   gnunet/src/template/gnunet-template.c
   gnunet/src/testbed/gnunet-testbed-profiler.c
   gnunet/src/testbed/test_testbed_api.conf
   gnunet/src/testbed/test_testbed_api_testbed_run_topologyclique.conf
   gnunet/src/testbed/test_testbed_api_testbed_run_topologyline.conf
   gnunet/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf
   gnunet/src/testing/gnunet-testing.c
   gnunet/src/testing_old/Makefile.am
   gnunet/src/testing_old/test_testing_2dtorus.conf
   gnunet/src/topology/gnunet-daemon-topology.c
   gnunet/src/topology/test_gnunet_daemon_topology_data.conf
   gnunet/src/transport/gnunet-transport.c
   gnunet/src/transport/template_cfg_peer1.conf
   gnunet/src/transport/template_cfg_peer2.conf
   gnunet/src/transport/test_transport_api_bidirectional_connect_peer1.conf
   gnunet/src/transport/test_transport_api_disconnect_tcp_peer1.conf
   gnunet/src/transport/test_transport_api_http_peer1.conf
   gnunet/src/transport/test_transport_api_http_peer2.conf
   gnunet/src/transport/test_transport_api_http_reverse_peer1.conf
   gnunet/src/transport/test_transport_api_https_peer1.conf
   gnunet/src/transport/test_transport_api_https_peer2.conf
   gnunet/src/transport/test_transport_api_reliability_http_peer1.conf
   gnunet/src/transport/test_transport_api_reliability_http_peer2.conf
   gnunet/src/transport/test_transport_api_reliability_tcp_peer2.conf
   gnunet/src/transport/test_transport_api_tcp_nat_peer1.conf
   gnunet/src/transport/test_transport_api_tcp_nat_peer2.conf
   gnunet/src/transport/test_transport_api_tcp_peer1.conf
   gnunet/src/transport/test_transport_api_timeout_http_peer1.conf
   gnunet/src/transport/test_transport_api_timeout_http_peer2.conf
   gnunet/src/transport/test_transport_api_timeout_https_peer1.conf
   gnunet/src/transport/test_transport_api_timeout_https_peer2.conf
   gnunet/src/transport/test_transport_api_udp_nat_peer1.conf
   gnunet/src/transport/test_transport_api_udp_nat_peer2.conf
   gnunet/src/transport/test_transport_api_wlan_peer1.conf
   gnunet/src/transport/test_transport_api_wlan_peer2.conf
   gnunet/src/transport/transport-testing.c
   gnunet/src/util/gnunet-config.c
   gnunet/src/util/gnunet-ecc.c
   gnunet/src/util/gnunet-resolver.c
   gnunet/src/util/gnunet-rsa.c
   gnunet/src/util/gnunet-uri.c
   gnunet/src/util/os_installation.c
   gnunet/src/util/test_common_logging_runtime_loglevels.c
   gnunet/src/util/test_os_start_process.c
   gnunet/src/util/test_plugin.c
   gnunet/src/util/test_resolver_api_data.conf
   gnunet/src/util/test_server_mst_interrupt.c
   gnunet/src/vpn/gnunet-vpn.c
Log:
-misc bugfixes, travel hacking

Modified: gnunet/src/arm/gnunet-arm.c
===================================================================
--- gnunet/src/arm/gnunet-arm.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/arm/gnunet-arm.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -450,9 +450,10 @@
                          ("Control services and the Automated Restart Manager 
(ARM)"),
                          options, &run, NULL))
     {
+      GNUNET_free ((void *) argv);
       return ret;
     }
-
+  GNUNET_free ((void*) argv);
   return 1;
 }
 

Modified: gnunet/src/arm/test_arm_api_data.conf
===================================================================
--- gnunet/src/arm/test_arm_api_data.conf       2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/arm/test_arm_api_data.conf       2012-11-04 21:01:22 UTC (rev 
24693)
@@ -6,16 +6,13 @@
 DEFAULTSERVICES =
 BINARY = gnunet-service-arm
 OPTIONS = -L ERROR
-# DEBUG = YES
 #PREFIX = valgrind --tool=memcheck --leak-check=yes
 
 [resolver]
-# DEBUG = YES
 PORT = 23355
 # PREFIX = valgrind
 
 [do-nothing]
-#DEBUG = YES
 AUTOSTART = NO
 PORT = 2223
 HOSTNAME = localhost
@@ -42,7 +39,6 @@
 
 [statistics]
 AUTOSTART = YES
-# DEBUG = NO
 
 
 [dns]

Modified: gnunet/src/arm/test_exponential_backoff.c
===================================================================
--- gnunet/src/arm/test_exponential_backoff.c   2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/arm/test_exponential_backoff.c   2012-11-04 21:01:22 UTC (rev 
24693)
@@ -28,8 +28,6 @@
 #include "gnunet_program_lib.h"
 #include "gnunet_protocols.h"
 
-#define VERBOSE GNUNET_NO
-
 #define START_ARM GNUNET_YES
 
 #define LOG_BACKOFF GNUNET_NO
@@ -115,9 +113,7 @@
 
   if (msg == NULL) 
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service shutdown complete.\n");
-#endif
     if (shutdown_ctx->cont != NULL)
       shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO);
     
@@ -131,10 +127,8 @@
   switch (ntohs (msg->type))
   {
   case GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN:
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                "Received confirmation for service shutdown.\n");
-#endif
     shutdown_ctx->confirmed = GNUNET_YES;
     GNUNET_CLIENT_receive (shutdown_ctx->sock,
                           &service_shutdown_handler, shutdown_ctx,
@@ -379,9 +373,6 @@
   char *const argv[] = {
     "test-exponential-backoff",
     "-c", "test_arm_api_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -431,11 +422,7 @@
   int ret;
 
   GNUNET_log_setup ("test-exponential-backoff",
-#if VERBOSE
-                   "DEBUG",
-#else
                    "WARNING",
-#endif
                    NULL);
 
   init ();

Modified: gnunet/src/ats/gnunet-service-ats_addresses.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses.c       2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/ats/gnunet-service-ats_addresses.c       2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -35,8 +35,6 @@
 #include "gnunet-service-ats_addresses_mlp.h"
 #endif
 
-#define VERBOSE GNUNET_NO
-
 #define ATS_BLOCKING_DELTA 
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 100)
 
 enum ATS_Mode
@@ -356,6 +354,8 @@
   return old;
 }
 
+
+#if DEADCODE
 static int
 compare_address_session_it (void *cls, const struct GNUNET_HashCode * key, 
void *value)
 {
@@ -383,7 +383,7 @@
  * @param addr existing address record
  * @return existing address record, NULL for none
  */
-struct ATS_Address *
+static struct ATS_Address *
 find_exact_address (const struct GNUNET_PeerIdentity *peer,
               const struct ATS_Address *addr)
 {
@@ -395,6 +395,7 @@
                                               &compare_address_session_it, 
&cac);
   return cac.exact_address;
 }
+#endif
 
 
 void
@@ -569,11 +570,9 @@
   if (aa->session_id != 0)
     GNUNET_break (0 == strcmp (info->plugin, aa->plugin));
   /* session died */
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Deleting session for peer `%s': `%s' %u\n",
               GNUNET_i2s (&aa->peer), aa->plugin, aa->session_id);
-#endif
   aa->session_id = 0;
 
   if (GNUNET_YES == aa->active)
@@ -586,11 +585,9 @@
   /* session == 0 and addrlen == 0 : destroy address */
   if (aa->addr_len == 0)
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Deleting session and address for peer `%s': `%s' %u\n",
                 GNUNET_i2s (&aa->peer), aa->plugin, aa->session_id);
-#endif
     (void) destroy_address (aa);
   }
   else
@@ -605,6 +602,7 @@
   return GNUNET_OK;
 }
 
+
 void
 GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer,
                        const char *plugin_name, const void *plugin_addr,
@@ -773,7 +771,8 @@
 }
 
 
-void request_address_mlp (const struct GNUNET_PeerIdentity *peer)
+static void 
+request_address_mlp (const struct GNUNET_PeerIdentity *peer)
 {
   struct ATS_Address *aa;
   aa = NULL;
@@ -815,7 +814,9 @@
 
 }
 
-void request_address_simple (const struct GNUNET_PeerIdentity *peer)
+
+static void 
+request_address_simple (const struct GNUNET_PeerIdentity *peer)
 {
   struct ATS_Address *aa;
   aa = NULL;
@@ -884,6 +885,7 @@
   return GNUNET_OK;
 }
 
+
 void
 GAS_addresses_handle_backoff_reset (const struct GNUNET_PeerIdentity *peer)
 {
@@ -1112,9 +1114,11 @@
   void *it_cls;
 };
 
-int peerinfo_it (void *cls,
-                 const struct GNUNET_HashCode * key,
-                 void *value)
+
+static int 
+peerinfo_it (void *cls,
+            const struct GNUNET_HashCode * key,
+            void *value)
 {
   struct PeerInfoIteratorContext *pi_ctx = cls;
   struct ATS_Address *addr = (struct ATS_Address *)  value;
@@ -1130,6 +1134,7 @@
   return GNUNET_YES;
 }
 
+
 /**
  * Return all peers currently known to ATS
  *

Modified: gnunet/src/ats/perf_ats_mlp.c
===================================================================
--- gnunet/src/ats/perf_ats_mlp.c       2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/ats/perf_ats_mlp.c       2012-11-04 21:01:22 UTC (rev 24693)
@@ -366,8 +366,7 @@
   GNUNET_PROGRAM_run (argc, argv,
                       "perf_ats_mlp", "nohelp", options,
                       &check, NULL);
-
-
+  GNUNET_free ((void *) argv);
   return ret;
 }
 

Modified: gnunet/src/ats/test_ats_api.conf
===================================================================
--- gnunet/src/ats/test_ats_api.conf    2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/ats/test_ats_api.conf    2012-11-04 21:01:22 UTC (rev 24693)
@@ -7,7 +7,6 @@
 UNIXPATH = /tmp/test-ats-scheduling-arm.sock
 
 [ats]
-#DEBUG = YES
 #PREFIX = valgrind --leak-check=full
 AUTOSTART = YES
 PORT = 12002

Modified: gnunet/src/ats/test_ats_api_update_address.c
===================================================================
--- gnunet/src/ats/test_ats_api_update_address.c        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/ats/test_ats_api_update_address.c        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -34,7 +34,6 @@
 #include "gnunet_ats_service.h"
 #include "gnunet_transport_service.h"
 
-#define START_ARM GNUNET_YES
 
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
 

Modified: gnunet/src/chat/test_chat.c
===================================================================
--- gnunet/src/chat/test_chat.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/chat/test_chat.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -37,10 +37,6 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_chat_service.h"
 
-#define VERBOSE GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
 /**
  * How long until we give up on passing the test?
  */
@@ -49,9 +45,7 @@
 struct PeerContext
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
-#if START_ARM
   struct GNUNET_OS_Process *arm_proc;
-#endif
 };
 
 struct Wanted
@@ -120,12 +114,10 @@
 
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
-#if START_ARM
   p->arm_proc =
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 
NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
-#endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   GNUNET_free (binary);
 }
@@ -134,7 +126,6 @@
 static void
 stop_arm (struct PeerContext *p)
 {
-#if START_ARM
   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
@@ -143,7 +134,6 @@
               GNUNET_OS_process_get_pid (p->arm_proc));
   GNUNET_OS_process_destroy (p->arm_proc);
   p->arm_proc = NULL;
-#endif
   GNUNET_CONFIGURATION_destroy (p->cfg);
 }
 
@@ -168,9 +158,8 @@
 static void
 timeout_kill (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  printf ("Timed out, stopping the test.\n");
-#endif
+  fprintf (stderr,
+          "Timed out, stopping the test.\n");
   kill_task = GNUNET_SCHEDULER_NO_TASK;
   if (wait_task != GNUNET_SCHEDULER_NO_TASK)
   {
@@ -187,9 +176,8 @@
 {
   struct Wanted *want = cls;
 
-#if VERBOSE
-  printf ("%s has joined\n", want->me);
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "%s has joined\n", want->me);
   if (NULL != want->next_task)
     GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls);
   return GNUNET_OK;
@@ -204,13 +192,12 @@
   struct Wanted *want = cls;
   struct GNUNET_HashCode sender;
 
-#if VERBOSE
-  printf ("%s - told that %s has %s\n", want->me,
-          member_info ==
-          NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (member_info,
-                                                                
EXTRACTOR_METATYPE_TITLE),
-          member_info == NULL ? "left" : "joined");
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "%s - told that %s has %s\n", want->me,
+             member_info ==
+             NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (member_info,
+                                                                   
EXTRACTOR_METATYPE_TITLE),
+             member_info == NULL ? "left" : "joined");
   GNUNET_CRYPTO_hash (member_id,
                       sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
                       &sender);
@@ -242,12 +229,12 @@
 {
   struct Wanted *want = cls;
 
-#if VERBOSE
-  printf ("%s - told that %s said %s\n", want->me,
-          meta == NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (meta,
-                                                                        
EXTRACTOR_METATYPE_TITLE),
-          message);
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+
+             "%s - told that %s said %s\n", want->me,
+             meta == NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type 
(meta,
+                                                                           
EXTRACTOR_METATYPE_TITLE),
+             message);
   if ((0 == strcmp (message, want->msg)) &&
       (((sender == NULL) && (want->sender == NULL)) ||
        ((sender != NULL) && (want->sender != NULL) &&
@@ -280,12 +267,11 @@
 {
   struct Wanted *want = cls;
 
-#if VERBOSE
-  printf ("%s - told that %s acknowledged message #%d\n", want->me,
-          GNUNET_CONTAINER_meta_data_get_by_type (want->meta,
-                                                  EXTRACTOR_METATYPE_TITLE),
-          orig_seq_number);
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "%s - told that %s acknowledged message #%d\n", want->me,
+             GNUNET_CONTAINER_meta_data_get_by_type (want->meta,
+                                                     EXTRACTOR_METATYPE_TITLE),
+             orig_seq_number);
   if ((0 == memcmp (receiver, want->sender, sizeof (struct GNUNET_HashCode))) 
&&
       (orig_seq_number == want->sequence_number) &&
       (timestamp.abs_value >= want->timestamp.abs_value))
@@ -308,9 +294,6 @@
 {
   GNUNET_SCHEDULER_Task task = cls;
 
-#if VERBOSE
-  printf ("Waiting...\n");
-#endif
   if (is_ready)
   {
     wait_task = GNUNET_SCHEDULER_NO_TASK;
@@ -327,9 +310,8 @@
 static void
 disconnect_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  printf ("Alice is leaving.\n");
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Alice is leaving.\n");
   if (is_p2p)
     stop_arm (&p2);
   GNUNET_CHAT_leave_room (alice_room);
@@ -342,9 +324,8 @@
 static void
 disconnect_bob (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  printf ("Bod is leaving.\n");
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Bob is leaving.\n");
   alice_wanted.meta = NULL;
   alice_wanted.sender = &bob;
   alice_wanted.msg = NULL;
@@ -366,10 +347,8 @@
 static void
 send_to_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  printf ("Bob says 'Hi!'\n");
-#endif
-
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Bob says 'Hi!'\n");
   alice_wanted.meta = bob_meta;
   alice_wanted.sender = &bob;
   alice_wanted.msg = "Hi Alice!";
@@ -388,9 +367,8 @@
   enum GNUNET_CHAT_MsgOptions options;
   uint32_t *seq = NULL;
 
-#if VERBOSE
-  printf ("Alice says 'Hi!'\n");
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Alice says 'Hi!'\n");
   if (is_ackn)
   {
     options = GNUNET_CHAT_MSG_ACKNOWLEDGED;
@@ -449,9 +427,8 @@
 static void
 join_bob_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  printf ("Bob joining\n");
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Bob joining\n");
   alice_wanted.meta = bob_meta;
   alice_wanted.sender = &bob;
   alice_wanted.msg = NULL;
@@ -480,9 +457,8 @@
 static void
 join_alice_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  printf ("Alice joining\n");
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Alice joining\n");
   alice_wanted.next_task = &join_bob_task;
   alice_wanted.next_task_cls = NULL;
   alice_room =
@@ -537,9 +513,6 @@
     "test-chat",
     "-c",
     "test_chat_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -547,11 +520,7 @@
   };
 
   GNUNET_log_setup ("test_chat",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   if (strstr (argv[0], "p2p") != NULL)
   {

Modified: gnunet/src/chat/test_chat_private.c
===================================================================
--- gnunet/src/chat/test_chat_private.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/chat/test_chat_private.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -32,8 +32,6 @@
 
 #define VERBOSE GNUNET_NO
 
-#define START_ARM GNUNET_YES
-
 /**
  * How long until we give up on passing the test?
  */
@@ -47,9 +45,7 @@
 struct PeerContext
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
-#if START_ARM
   struct GNUNET_OS_Process *arm_proc;
-#endif
 };
 
 struct Wanted
@@ -134,12 +130,10 @@
 
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
-#if START_ARM
   p->arm_proc =
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 
NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
-#endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   GNUNET_free (binary);
 }
@@ -148,7 +142,6 @@
 static void
 stop_arm (struct PeerContext *p)
 {
-#if START_ARM
   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
@@ -157,7 +150,6 @@
               GNUNET_OS_process_get_pid (p->arm_proc));
   GNUNET_OS_process_destroy (p->arm_proc);
   p->arm_proc = NULL;
-#endif
   GNUNET_CONFIGURATION_destroy (p->cfg);
 }
 

Modified: gnunet/src/core/core.conf.in
===================================================================
--- gnunet/src/core/core.conf.in        2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/core/core.conf.in        2012-11-04 21:01:22 UTC (rev 24693)
@@ -10,7 +10,6 @@
 UNIX_MATCH_UID = YES
 UNIX_MATCH_GID = YES
 # DISABLE_SOCKET_FORWARDING = NO
-# DEBUG = YES
 # USERNAME = 
 # MAXBUF =
 # TIMEOUT =

Modified: gnunet/src/core/test_core_api.c
===================================================================
--- gnunet/src/core/test_core_api.c     2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/core/test_core_api.c     2012-11-04 21:01:22 UTC (rev 24693)
@@ -31,10 +31,6 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
 #define MTYPE 12345
 
 struct PeerContext
@@ -46,9 +42,7 @@
   struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
   struct GNUNET_MessageHeader *hello;
   int connect_status;
-#if START_ARM
   struct GNUNET_OS_Process *arm_proc;
-#endif
 };
 
 static struct PeerContext p1;
@@ -61,11 +55,7 @@
 
 static int ok;
 
-#if VERBOSE
 #define OKPP do { ok++; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Now at stage %u 
at %s:%u\n", ok, __FILE__, __LINE__); } while (0)
-#else
-#define OKPP do { ok++; } while (0)
-#endif
 
 
 static void
@@ -111,9 +101,8 @@
 static void
 terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
-  FPRINTF (stderr, "ENDING ANGRILY %u\n", ok);
-#endif
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "ENDING ANGRILY %u\n", ok);
   GNUNET_break (0);
   if (NULL != p1.ch)
   {
@@ -320,14 +309,12 @@
 
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
-#if START_ARM
   p->arm_proc =
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 
                             NULL, NULL, 
                             binary,
                             "gnunet-service-arm",
                                "-c", cfgname, NULL);
-#endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL);
   GNUNET_assert (p->th != NULL);
@@ -358,7 +345,6 @@
 static void
 stop_arm (struct PeerContext *p)
 {
-#if START_ARM
   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
@@ -367,19 +353,16 @@
               GNUNET_OS_process_get_pid (p->arm_proc));
   GNUNET_OS_process_destroy (p->arm_proc);
   p->arm_proc = NULL;
-#endif
   GNUNET_CONFIGURATION_destroy (p->cfg);
 }
 
+
 static int
 check ()
 {
   char *const argv[] = { "test-core-api",
     "-c",
     "test_core_api_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -399,11 +382,7 @@
   int ret;
 
   GNUNET_log_setup ("test-core-api",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   ret = check ();
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");

Modified: gnunet/src/core/test_core_api_reliability.c
===================================================================
--- gnunet/src/core/test_core_api_reliability.c 2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/core/test_core_api_reliability.c 2012-11-04 21:01:22 UTC (rev 
24693)
@@ -33,8 +33,6 @@
 #include "gnunet_transport_service.h"
 #include <gauger.h>
 
-#define START_ARM GNUNET_YES
-
 /**
  * Note that this value must not significantly exceed
  * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
@@ -73,9 +71,7 @@
   struct GNUNET_MessageHeader *hello;
   struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
   int connect_status;
-#if START_ARM
   struct GNUNET_OS_Process *arm_proc;
-#endif
 };
 
 static struct PeerContext p1;
@@ -121,8 +117,10 @@
   GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
   GNUNET_CORE_disconnect (p1.ch);
   p1.ch = NULL;
+  GNUNET_free_non_null (p1.hello);
   GNUNET_CORE_disconnect (p2.ch);
   p2.ch = NULL;
+  GNUNET_free_non_null (p2.hello);
   if (connect_task != GNUNET_SCHEDULER_NO_TASK)
     GNUNET_SCHEDULER_cancel (connect_task);
   GNUNET_TRANSPORT_disconnect (p1.th);
@@ -409,8 +407,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received (my) `%s' from transport service\n", "HELLO");
   GNUNET_assert (message != NULL);
-  p->hello = GNUNET_malloc (ntohs (message->size));
-  memcpy (p->hello, message, ntohs (message->size));
+  p->hello = GNUNET_copy_message (message);
   if ((p == &p1) && (p2.th != NULL))
     GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL);
   if ((p == &p2) && (p1.th != NULL))
@@ -430,12 +427,10 @@
 
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
-#if START_ARM
   p->arm_proc =
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 
NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
-#endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL);
   GNUNET_assert (p->th != NULL);
@@ -463,7 +458,6 @@
 static void
 stop_arm (struct PeerContext *p)
 {
-#if START_ARM
   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
@@ -472,7 +466,6 @@
               GNUNET_OS_process_get_pid (p->arm_proc));
   GNUNET_OS_process_destroy (p->arm_proc);
   p->arm_proc = NULL;
-#endif
   GNUNET_CONFIGURATION_destroy (p->cfg);
 }
 

Modified: gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf
===================================================================
--- gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf  
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf  
2012-11-04 21:01:22 UTC (rev 24693)
@@ -34,5 +34,4 @@
 [core]
 PORT = 12490
 UNIXPATH = /tmp/gnunet-core-asym-recv-p1-service-core.sock
-DEBUG = NO
 

Modified: gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf
===================================================================
--- gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf  
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf  
2012-11-04 21:01:22 UTC (rev 24693)
@@ -26,7 +26,6 @@
 [core]
 PORT = 22490
 UNIXPATH = /tmp/gnunet-core-asym-recv-p2-service-core.sock
-DEBUG = NO
 
 [ats]
 PORT = 22491

Modified: gnunet/src/core/test_core_quota_asymmetric_send_limit_peer1.conf
===================================================================
--- gnunet/src/core/test_core_quota_asymmetric_send_limit_peer1.conf    
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/core/test_core_quota_asymmetric_send_limit_peer1.conf    
2012-11-04 21:01:22 UTC (rev 24693)
@@ -34,4 +34,3 @@
 [core]
 PORT = 12490
 UNIXPATH = /tmp/gnunet-core-asym-send-p1-service-core.sock
-DEBUG = NO

Modified: gnunet/src/core/test_core_quota_asymmetric_send_limit_peer2.conf
===================================================================
--- gnunet/src/core/test_core_quota_asymmetric_send_limit_peer2.conf    
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/core/test_core_quota_asymmetric_send_limit_peer2.conf    
2012-11-04 21:01:22 UTC (rev 24693)
@@ -25,7 +25,6 @@
 [core]
 PORT = 22490
 UNIXPATH = /tmp/gnunet-core-asym-send-p2-service-core.sock
-DEBUG = NO
 
 [ats]
 PORT = 22491

Modified: gnunet/src/core/test_core_quota_compliance.c
===================================================================
--- gnunet/src/core/test_core_quota_compliance.c        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/core/test_core_quota_compliance.c        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -38,8 +38,6 @@
 #define ASYMMETRIC_SEND_LIMITED 1
 #define ASYMMETRIC_RECV_LIMITED 2
 
-#define START_ARM GNUNET_YES
-
 /**
  * Note that this value must not significantly exceed
  * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
@@ -84,9 +82,7 @@
   struct GNUNET_STATISTICS_Handle *stats;
   struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
   int connect_status;
-#if START_ARM
   struct GNUNET_OS_Process *arm_proc;
-#endif
 };
 
 static struct PeerContext p1;
@@ -146,6 +142,8 @@
   p1.th = NULL;
   GNUNET_TRANSPORT_disconnect (p2.th);
   p2.th = NULL;
+  GNUNET_free_non_null (p1.hello);
+  GNUNET_free_non_null (p2.hello);
 }
 
 
@@ -574,12 +572,10 @@
 
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
-#if START_ARM
   p->arm_proc =
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 
NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
-#endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   p->stats = GNUNET_STATISTICS_create ("core", p->cfg);
   GNUNET_assert (p->stats != NULL);
@@ -642,7 +638,6 @@
 static void
 stop_arm (struct PeerContext *p)
 {
-#if START_ARM
   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
@@ -651,7 +646,6 @@
               GNUNET_OS_process_get_pid (p->arm_proc));
   GNUNET_OS_process_destroy (p->arm_proc);
   p->arm_proc = NULL;
-#endif
   GNUNET_CONFIGURATION_destroy (p->cfg);
 }
 

Modified: gnunet/src/core/test_core_quota_peer1.conf
===================================================================
--- gnunet/src/core/test_core_quota_peer1.conf  2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/core/test_core_quota_peer1.conf  2012-11-04 21:01:22 UTC (rev 
24693)
@@ -32,7 +32,6 @@
 [core]
 PORT = 12480
 UNIXPATH = /tmp/gnunet-core-sym-p1-service-core.sock
-DEBUG = NO
 
 [ats]
 PORT = 12481

Modified: gnunet/src/core/test_core_quota_peer2.conf
===================================================================
--- gnunet/src/core/test_core_quota_peer2.conf  2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/core/test_core_quota_peer2.conf  2012-11-04 21:01:22 UTC (rev 
24693)
@@ -25,7 +25,6 @@
 [core]
 PORT = 22480
 UNIXPATH = /tmp/gnunet-core-sym-p2-service-core.sock
-DEBUG = NO
 
 [ats]
 PORT = 22482

Modified: gnunet/src/datastore/test_plugin_datastore.c
===================================================================
--- gnunet/src/datastore/test_plugin_datastore.c        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/datastore/test_plugin_datastore.c        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -320,6 +320,8 @@
   if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env)))
   {
     FPRINTF (stderr, "Failed to load plugin `%s'!\n", name);
+    GNUNET_free (libname);
+    GNUNET_free (name);
     return NULL;
   }
   GNUNET_free (libname);

Modified: gnunet/src/dht/dht.conf.in
===================================================================
--- gnunet/src/dht/dht.conf.in  2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/dht/dht.conf.in  2012-11-04 21:01:22 UTC (rev 24693)
@@ -12,7 +12,6 @@
 UNIX_MATCH_UID = YES
 UNIX_MATCH_GID = YES
 # DISABLE_SOCKET_FORWARDING = NO
-# DEBUG = YES
 # USERNAME = 
 # MAXBUF =
 # TIMEOUT =

Modified: gnunet/src/dht/test_dht_api_data.conf
===================================================================
--- gnunet/src/dht/test_dht_api_data.conf       2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/dht/test_dht_api_data.conf       2012-11-04 21:01:22 UTC (rev 
24693)
@@ -27,7 +27,6 @@
 PORT = 2092
 
 [dht]
-DEBUG = NO
 PORT = 12370
 
 [block]
@@ -35,7 +34,6 @@
 
 [transport]
 plugins = tcp
-DEBUG = NO
 NEIGHBOUR_LIMIT = 50
 PORT = 2091
 

Modified: gnunet/src/dht/test_dht_api_peer1.conf
===================================================================
--- gnunet/src/dht/test_dht_api_peer1.conf      2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/dht/test_dht_api_peer1.conf      2012-11-04 21:01:22 UTC (rev 
24693)
@@ -5,7 +5,6 @@
 AUTOSTART = NO
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -22,7 +21,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -38,7 +36,6 @@
 [arm]
 DEFAULTSERVICES = core
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s

Modified: gnunet/src/dns/gnunet-dns-monitor.c
===================================================================
--- gnunet/src/dns/gnunet-dns-monitor.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/dns/gnunet-dns-monitor.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -363,12 +363,13 @@
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
-
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-monitor",
-                              gettext_noop
-                              ("Monitor DNS queries."), options,
-                              &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-monitor",
+                            gettext_noop
+                            ("Monitor DNS queries."), options,
+                            &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 

Modified: gnunet/src/dns/gnunet-dns-redirector.c
===================================================================
--- gnunet/src/dns/gnunet-dns-redirector.c      2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/dns/gnunet-dns-redirector.c      2012-11-04 21:01:22 UTC (rev 
24693)
@@ -245,11 +245,13 @@
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-redirector",
-                              gettext_noop
-                              ("Change DNS replies to point elsewhere."), 
options,
-                              &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-redirector",
+                            gettext_noop
+                            ("Change DNS replies to point elsewhere."), 
options,
+                            &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 

Modified: gnunet/src/dv/dv.conf.in
===================================================================
--- gnunet/src/dv/dv.conf.in    2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/dv/dv.conf.in    2012-11-04 21:01:22 UTC (rev 24693)
@@ -1,6 +1,5 @@
 [dv]
 AUTOSTART = YES
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 BINARY = gnunet-service-dv

Modified: gnunet/src/dv/test_transport_api_dv.c
===================================================================
--- gnunet/src/dv/test_transport_api_dv.c       2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/dv/test_transport_api_dv.c       2012-11-04 21:01:22 UTC (rev 
24693)
@@ -25,8 +25,6 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_core_service.h"
 
-#define VERBOSE 1
-
 #define TEST_ALL GNUNET_NO
 
 /**
@@ -176,17 +174,13 @@
 {
   if (emsg != NULL)
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown of peers failed!\n");
-#endif
     if (ok == 0)
       ok = 666;
   }
   else
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All peers successfully shut 
down!\n");
-#endif
   }
 }
 
@@ -200,10 +194,8 @@
   struct TestMessageContext *free_pos;
 
   die_task = GNUNET_SCHEDULER_NO_TASK;
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Called finish testing, stopping daemons.\n");
-#endif
   peer_pos = all_peers;
   while (peer_pos != NULL)
   {
@@ -258,20 +250,11 @@
     }
     GNUNET_free (free_pos);
   }
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "transmit_ready's scheduled %d, failed %d, transmit_ready's 
called %d\n",
               transmit_ready_scheduled, transmit_ready_failed,
               transmit_ready_called);
-#endif
-
-#if VERBOSE
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Calling daemons_stop\n");
-#endif
   GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
-#if VERBOSE
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "daemons_stop finished\n");
-#endif
   if (dotOutFile != NULL)
   {
     FPRINTF (dotOutFile, "%s",  "}");
@@ -288,16 +271,12 @@
   struct TestMessageContext *pos = cls;
 
   /* Disconnect from the respective cores */
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from peer 1 `%4s'\n",
               GNUNET_i2s (&pos->peer1->id));
-#endif
   if (pos->peer1handle != NULL)
     GNUNET_CORE_disconnect (pos->peer1handle);
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from peer 2 `%4s'\n",
               GNUNET_i2s (&pos->peer2->id));
-#endif
   if (pos->peer2handle != NULL)
     GNUNET_CORE_disconnect (pos->peer2handle);
   /* Set handles to NULL so test case can be ended properly */
@@ -422,23 +401,17 @@
 {
   struct TestMessageContext *pos = cls;
   struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *) message;
+  uint32_t distance;
 
-#if VERBOSE
-  uint32_t distance;
-#endif
   if (pos->uid != ntohl (msg->uid))
     return GNUNET_OK;
-
-#if VERBOSE
   distance = get_atsi_distance (atsi, atsi_count);
-#endif
   GNUNET_assert (0 ==
                  memcmp (peer, &pos->peer1->id,
                          sizeof (struct GNUNET_PeerIdentity)));
   if (total_other_expected_messages == 0)
   {
     total_messages_received++;
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Received message from `%4s', type %d, uid %u, distance %u.\n",
                 GNUNET_i2s (peer), ntohs (message->type), ntohl (msg->uid),
@@ -446,12 +419,10 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Total messages received %d, expected %d.\n",
                 total_messages_received, expected_messages);
-#endif
   }
   else
   {
     total_other_messages++;
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Received message from `%4s', type %d, uid %u, distance %u.\n",
                 GNUNET_i2s (peer), ntohs (message->type), ntohl (msg->uid),
@@ -459,17 +430,14 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Total OTHER messages received %d, expected %d.\n",
                 total_other_messages, total_other_expected_messages);
-#endif
   }
 
   if ((total_messages_received == expected_messages) &&
       (total_other_messages == 0))
   {
     GNUNET_SCHEDULER_cancel (die_task);
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Scheduling timeout from DV connections.\n");
-#endif
     die_task =
         GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly,
                                       "waiting for DV peers to connect!");
@@ -500,12 +468,10 @@
   m->header.size = htons (sizeof (struct GNUNET_TestMessage));
   m->uid = htonl (pos->uid);
   transmit_ready_called++;
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "transmit ready for peer %s\ntransmit_ready's scheduled %d, 
transmit_ready's called %d\n",
               GNUNET_i2s (&pos->peer1->id), transmit_ready_scheduled,
               transmit_ready_called);
-#endif
   return sizeof (struct GNUNET_TestMessage);
 }
 
@@ -537,11 +503,9 @@
 
   if (0 == memcmp (&pos->peer1->id, peer, sizeof (struct GNUNET_PeerIdentity)))
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Core connection from `%s' to `%4s' verfied, sending 
message!\n",
                 GNUNET_i2s (&pos->peer2->id), GNUNET_h2s (&peer->hashPubKey));
-#endif
     if (NULL ==
         GNUNET_CORE_notify_transmit_ready (pos->peer1handle, GNUNET_YES, 0,
                                            TIMEOUT, &pos->peer2->id,
@@ -566,11 +530,9 @@
 init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server,
                    const struct GNUNET_PeerIdentity *my_identity)
 {
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core connection to `%4s' established, awaiting connections.\n",
               GNUNET_i2s (my_identity));
-#endif
   total_server_connections++;
 }
 
@@ -592,11 +554,9 @@
 
   if (0 == memcmp (&pos->peer2->id, peer, sizeof (struct GNUNET_PeerIdentity)))
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Core connection from `%s' to `%4s' verified.\n",
                 GNUNET_i2s (&pos->peer1->id), GNUNET_h2s (&peer->hashPubKey));
-#endif
     /*
      * Connect to the receiving peer
      */
@@ -612,11 +572,9 @@
                    const struct GNUNET_PeerIdentity *my_identity)
 {
   total_server_connections++;
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core connection to `%4s' established, awaiting 
connections...\n",
               GNUNET_i2s (my_identity));
-#endif
 }
 
 
@@ -642,11 +600,9 @@
                                   &send_test_messages, pos);
     return;                     /* Otherwise we'll double schedule messages 
here! */
   }
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Attempting to send test message from %s to %s\n",
               pos->peer1->shortname, pos->peer2->shortname);
-#endif
   /*
    * Connect to the sending peer
    */
@@ -739,12 +695,9 @@
     GNUNET_SCHEDULER_add_now (&end_badly,
                               "send_other_messages had 0 messages to send, no 
DV connections made!");
   }
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               "Preparing to send %d other test messages\n",
               total_other_expected_messages);
-#endif
-
   GNUNET_SCHEDULER_add_now (&send_test_messages, other_test_messages);
   if (GNUNET_SCHEDULER_NO_TASK != die_task)
     GNUNET_SCHEDULER_cancel (die_task);
@@ -768,11 +721,9 @@
   if (emsg == NULL)
   {
     total_connections++;
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "connected peer %s to peer %s, distance %u\n",
                 first_daemon->shortname, second_daemon->shortname, distance);
-#endif
     temp_context = GNUNET_malloc (sizeof (struct TestMessageContext));
     temp_context->peer1 = first_daemon;
     temp_context->peer2 = second_daemon;
@@ -782,7 +733,6 @@
     test_messages = temp_context;
     expected_messages++;
   }
-#if VERBOSE
   else
   {
     failed_connections++;
@@ -790,15 +740,12 @@
                 "Failed to connect peer %s to peer %s with error :\n%s\n",
                 first_daemon->shortname, second_daemon->shortname, emsg);
   }
-#endif
 
   if (total_connections == expected_connections)
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Created %u total connections, which is our target number!  
Calling send messages.\n",
                 total_connections);
-#endif
     if (GNUNET_SCHEDULER_NO_TASK != die_task)
       GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_NO_TASK;
@@ -825,13 +772,11 @@
   }
   else
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Have %d total connections, %d failed connections, Want %d (at 
least %d)\n",
                 total_connections, failed_connections, expected_connections,
                 expected_connections -
                 (unsigned int) (fail_percentage * expected_connections));
-#endif
   }
 }
 
@@ -864,12 +809,9 @@
   second_shortname = GNUNET_strdup (GNUNET_i2s (peer));
   distance = get_atsi_distance (atsi, atsi_count);
 
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "connected peer %s to peer %s, distance %u\n", d->shortname,
               second_shortname, distance);
-#endif
-
   second_daemon =
       GNUNET_CONTAINER_multihashmap_get (peer_daemon_hash, &peer->hashPubKey);
 
@@ -933,10 +875,8 @@
     return;
   }
   GNUNET_assert (id != NULL);
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n",
               (num_peers - peers_left) + 1, num_peers);
-#endif
   GNUNET_assert (GNUNET_SYSERR !=
                  GNUNET_CONTAINER_multihashmap_put (peer_daemon_hash,
                                                     &id->hashPubKey, d,
@@ -953,10 +893,8 @@
 
   if (peers_left == 0)
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "All %d daemons started, now creating topology!\n", num_peers);
-#endif
     GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_NO_TASK;
     expected_connections = -1;
@@ -967,10 +905,8 @@
                                            connect_topology_option,
                                            connect_topology_option_modifier,
                                            TIMEOUT, 12, NULL, NULL);
-#if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Have %d expected connections\n",
                   expected_connections);
-#endif
     }
 
     if (expected_connections == GNUNET_SYSERR)
@@ -1009,17 +945,13 @@
                 "Hostkey callback received error: %s\n", emsg);
   }
 
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Hostkey created for peer `%s'\n",
               GNUNET_i2s (id));
-#endif
   peers_left--;
   if (peers_left == 0)
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "All %d hostkeys created, now creating topology!\n", 
num_peers);
-#endif
     if (GNUNET_SCHEDULER_NO_TASK != die_task)
     {
       GNUNET_SCHEDULER_cancel (die_task);
@@ -1031,10 +963,8 @@
         (pg, topology, blacklist_topology,
          blacklist_transports) != GNUNET_SYSERR)
     {
-#if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Topology set up, now starting peers!\n");
-#endif
       GNUNET_TESTING_daemons_continue_startup (pg);
       /* Set up task in case topology creation doesn't finish
        * within a reasonable amount of time */
@@ -1070,11 +1000,8 @@
     FPRINTF (dotOutFile, "%s",  "strict graph G {\n");
   }
 
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Starting daemons based on config file %s\n", cfgfile);
-#endif
-
   if (GNUNET_YES !=
       GNUNET_CONFIGURATION_get_value_string (cfg, "paths", "servicehome",
                                              &test_directory))
@@ -1198,9 +1125,6 @@
   char *const argv[] = { "test-transport-dv",
     "-c",
     "test_transport_dv_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -1223,11 +1147,7 @@
   int ret;
 
   GNUNET_log_setup ("test-transport-dv",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   ret = check ();
   /**

Modified: gnunet/src/dv/test_transport_dv_data.conf
===================================================================
--- gnunet/src/dv/test_transport_dv_data.conf   2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/dv/test_transport_dv_data.conf   2012-11-04 21:01:22 UTC (rev 
24693)
@@ -5,7 +5,6 @@
 PORT = 2564
 
 [transport]
-DEBUG = YES
 PORT = 2565
 PLUGINS = tcp dv
 BLACKLIST_FILE = $SERVICEHOME/blacklist
@@ -34,7 +33,6 @@
 
 [dv]
 AUTOSTART = YES
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 BINARY = gnunet-service-dv
@@ -45,7 +43,6 @@
 [testing]
 NUM_PEERS = 3
 ADDITIONAL_MESSAGES = 10
-DEBUG = NO
 WEAKRANDOM = YES
 TOPOLOGY = CLIQUE
 CONNECT_TOPOLOGY = LINE

Modified: gnunet/src/fragmentation/test_fragmentation.c
===================================================================
--- gnunet/src/fragmentation/test_fragmentation.c       2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/fragmentation/test_fragmentation.c       2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -25,8 +25,6 @@
 #include "platform.h"
 #include "gnunet_fragmentation_lib.h"
 
-#define VERBOSE GNUNET_NO
-
 #define DETAILS GNUNET_NO
 
 /**
@@ -234,21 +232,13 @@
     "-c",
     "test_fragmentation_data.conf",
     "-L",
-#if VERBOSE
-    "DEBUG",
-#else
     "WARNING",
-#endif
     NULL
   };
   unsigned int i;
 
   GNUNET_log_setup ("test-fragmentation",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   for (i = 0; i < NUM_MSGS; i++)
     GNUNET_BANDWIDTH_tracker_init (&trackers[i],

Modified: gnunet/src/fs/fs.conf.in
===================================================================
--- gnunet/src/fs/fs.conf.in    2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/fs.conf.in    2012-11-04 21:01:22 UTC (rev 24693)
@@ -30,7 +30,6 @@
 
 # Do we require users that want to access file-sharing to be in the 'gnunet' 
group?
 UNIX_MATCH_GID = YES
-# DEBUG = YES
 
 # Maximum number of requests this peer tracks (important for
 # memory consumption; 2k RAM/request is not unusual)

Modified: gnunet/src/fs/gnunet-auto-share.c
===================================================================
--- gnunet/src/fs/gnunet-auto-share.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-auto-share.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -788,6 +788,7 @@
   sigpipe = NULL;
   GNUNET_free (cfg_filename);
   cfg_filename = NULL;
+  GNUNET_free ((void*) argv);
   return ok;
 }
 

Modified: gnunet/src/fs/gnunet-directory.c
===================================================================
--- gnunet/src/fs/gnunet-directory.c    2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-directory.c    2012-11-04 21:01:22 UTC (rev 24693)
@@ -177,11 +177,13 @@
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-directory [OPTIONS] 
FILENAME",
-                              gettext_noop
-                              ("Display contents of a GNUnet directory"),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-directory [OPTIONS] FILENAME",
+                            gettext_noop
+                            ("Display contents of a GNUnet directory"),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-directory.c */

Modified: gnunet/src/fs/gnunet-download.c
===================================================================
--- gnunet/src/fs/gnunet-download.c     2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-download.c     2012-11-04 21:01:22 UTC (rev 24693)
@@ -333,11 +333,13 @@
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI",
-                              gettext_noop
-                              ("Download files from GNUnet using a GNUnet CHK 
or LOC URI (gnunet://fs/chk/...)"),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI",
+                            gettext_noop
+                            ("Download files from GNUnet using a GNUnet CHK or 
LOC URI (gnunet://fs/chk/...)"),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-download.c */

Modified: gnunet/src/fs/gnunet-fs.c
===================================================================
--- gnunet/src/fs/gnunet-fs.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-fs.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -122,11 +122,12 @@
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
-
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]",
-                              gettext_noop ("Special file-sharing operations"),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]",
+                            gettext_noop ("Special file-sharing operations"),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-fs.c */

Modified: gnunet/src/fs/gnunet-helper-fs-publish.c
===================================================================
--- gnunet/src/fs/gnunet-helper-fs-publish.c    2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/fs/gnunet-helper-fs-publish.c    2012-11-04 21:01:22 UTC (rev 
24693)
@@ -364,8 +364,7 @@
   
   /* this is the expensive operation, *afterwards* we'll check for aborts */
   meta = GNUNET_CONTAINER_meta_data_create ();
-  if (NULL != plugins)
-    EXTRACTOR_extract (plugins, item->filename, NULL, 0, &add_to_md, meta);
+  EXTRACTOR_extract (plugins, item->filename, NULL, 0, &add_to_md, meta);
   slen = strlen (item->filename) + 1;
   size = GNUNET_CONTAINER_meta_data_get_serialized_size (meta);
   if (-1 == size)
@@ -462,6 +461,7 @@
     FPRINTF (stderr, 
             "%s",
             "gnunet-helper-fs-publish needs exactly one or two arguments\n");
+    GNUNET_free ((void*) argv);
     return 1;
   }
   filename_expanded = argv[1];
@@ -480,13 +480,19 @@
                                    &root))
   {
     (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 
0);
+    EXTRACTOR_plugin_remove_all (plugins);
+    GNUNET_free ((void*) argv);
     return 2;
   }
   /* signal that we're done counting files, so that a percentage of 
      progress can now be calculated */
   if (GNUNET_OK !=
       write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, 
NULL, 0))
+  {
+    EXTRACTOR_plugin_remove_all (plugins);
+    GNUNET_free ((void*) argv);
     return 3;  
+  }
   if (NULL != root)
   {
     if (GNUNET_OK !=
@@ -494,15 +500,16 @@
     {
       (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 
0);
       free_tree (root);
+      EXTRACTOR_plugin_remove_all (plugins);
+      GNUNET_free ((void*) argv);
       return 4;
     }
     free_tree (root);
   }
   /* enable "clean" shutdown by telling parent that we are done */
   (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 
0);
-  if (NULL != plugins)
-    EXTRACTOR_plugin_remove_all (plugins);
-
+  EXTRACTOR_plugin_remove_all (plugins);
+  GNUNET_free ((void*) argv);  
   return 0;
 }
 

Modified: gnunet/src/fs/gnunet-pseudonym.c
===================================================================
--- gnunet/src/fs/gnunet-pseudonym.c    2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-pseudonym.c    2012-11-04 21:01:22 UTC (rev 24693)
@@ -317,10 +317,12 @@
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-pseudonym [OPTIONS]",
-                              gettext_noop ("Manage GNUnet pseudonyms."),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-pseudonym [OPTIONS]",
+                            gettext_noop ("Manage GNUnet pseudonyms."),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-pseudonym.c */

Modified: gnunet/src/fs/gnunet-publish.c
===================================================================
--- gnunet/src/fs/gnunet-publish.c      2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-publish.c      2012-11-04 21:01:22 UTC (rev 24693)
@@ -734,19 +734,18 @@
      0, &GNUNET_GETOPT_set_one, &verbose},
     GNUNET_GETOPT_OPTION_END
   };
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "GNUnet publish starts\n");
   bo.expiration_time =
       GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2);
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
-
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME",
-                              gettext_noop
-                              ("Publish a file or directory on GNUnet"),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME",
+                            gettext_noop
+                            ("Publish a file or directory on GNUnet"),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-publish.c */

Modified: gnunet/src/fs/gnunet-search.c
===================================================================
--- gnunet/src/fs/gnunet-search.c       2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-search.c       2012-11-04 21:01:22 UTC (rev 24693)
@@ -303,11 +303,13 @@
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-search [OPTIONS] KEYWORD",
-                              gettext_noop
-                              ("Search GNUnet for files that were published on 
GNUnet"),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-search [OPTIONS] KEYWORD",
+                            gettext_noop
+                            ("Search GNUnet for files that were published on 
GNUnet"),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-search.c */

Modified: gnunet/src/fs/gnunet-unindex.c
===================================================================
--- gnunet/src/fs/gnunet-unindex.c      2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/fs/gnunet-unindex.c      2012-11-04 21:01:22 UTC (rev 24693)
@@ -173,11 +173,13 @@
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-unindex [OPTIONS] FILENAME",
-                              gettext_noop
-                              ("Unindex a file that was previously indexed 
with gnunet-publish."),
-                              options, &run, NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-unindex [OPTIONS] FILENAME",
+                            gettext_noop
+                            ("Unindex a file that was previously indexed with 
gnunet-publish."),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-unindex.c */

Modified: gnunet/src/gns/gnunet-dns2gns.c
===================================================================
--- gnunet/src/gns/gnunet-dns2gns.c     2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/gns/gnunet-dns2gns.c     2012-11-04 21:01:22 UTC (rev 24693)
@@ -692,7 +692,7 @@
                            _("GNUnet DNS-to-GNS proxy (a DNS server)"), 
                           options,
                            &run, NULL)) ? 0 : 1;
-
+  GNUNET_free ((void*) argv);
   return ret;
 }
 

Modified: gnunet/src/gns/gnunet-gns-fcfsd.c
===================================================================
--- gnunet/src/gns/gnunet-gns-fcfsd.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/gns/gnunet-gns-fcfsd.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -970,7 +970,7 @@
                            _("GNUnet GNS first come first serve registration 
service"), 
                           options,
                            &run, NULL)) ? 0 : 1;
-
+  GNUNET_free ((void*) argv);
   return ret;
 }
 

Modified: gnunet/src/gns/gnunet-gns.c
===================================================================
--- gnunet/src/gns/gnunet-gns.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/gns/gnunet-gns.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -381,7 +381,7 @@
                            _("GNUnet GNS access tool"), 
                           options,
                            &run, NULL)) ? 0 : 1;
-
+  GNUNET_free ((void*) argv);
   return ret;
 }
 

Modified: gnunet/src/gns/test_gns_dht_default.conf
===================================================================
--- gnunet/src/gns/test_gns_dht_default.conf    2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/gns/test_gns_dht_default.conf    2012-11-04 21:01:22 UTC (rev 
24693)
@@ -7,7 +7,6 @@
 
 [dht]
 UNIXPATH = /tmp/gnunet-service-dht.sock
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;

Modified: gnunet/src/gns/test_gns_simple_lookup.conf
===================================================================
--- gnunet/src/gns/test_gns_simple_lookup.conf  2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/gns/test_gns_simple_lookup.conf  2012-11-04 21:01:22 UTC (rev 
24693)
@@ -7,7 +7,6 @@
 HOSTNAME = localhost
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -24,7 +23,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -40,7 +38,6 @@
 [arm]
 DEFAULTSERVICES = core dht namestore gns
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s

Modified: gnunet/src/gns/w32nsp-resolve.c
===================================================================
--- gnunet/src/gns/w32nsp-resolve.c     2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/gns/w32nsp-resolve.c     2012-11-04 21:01:22 UTC (rev 24693)
@@ -57,7 +57,8 @@
 // to convert structures returned as BLOBs.
 //
 
-VOID FixList(PCHAR ** List, PCHAR Base)
+VOID 
+FixList(PCHAR ** List, PCHAR Base)
 {
     if(*List)
     {
@@ -77,7 +78,8 @@
 // Routine to convert a hostent returned in a BLOB to one with
 // usable pointers. The structure is converted in-place.
 //
-VOID UnpackHostEnt(struct hostent * hostent)
+VOID 
+UnpackHostEnt(struct hostent * hostent)
 {
      PCHAR pch;
 
@@ -91,13 +93,15 @@
      FixList(&hostent->h_addr_list, pch);
 }
 
-void
+
+static void
 print_hostent (struct hostent *he)
 {
   int i;
   char **pAlias;
+
   printf("\tOfficial name: %s\n", he->h_name);
-  for (pAlias = he->h_aliases; *pAlias != 0; pAlias++) {
+  for (i=0, pAlias = he->h_aliases; *pAlias != 0; pAlias++) {
       printf("\tAlternate name #%d: %s\n", ++i, *pAlias);
   }
   printf("\tAddress type: ");
@@ -150,6 +154,7 @@
   }
 }
 
+
 int
 main (int argc, char **argv)
 {

Modified: gnunet/src/hello/gnunet-hello.c
===================================================================
--- gnunet/src/hello/gnunet-hello.c     2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/hello/gnunet-hello.c     2012-11-04 21:01:22 UTC (rev 24693)
@@ -25,10 +25,6 @@
 #include "platform.h"
 #include "gnunet_hello_lib.h"
 
-#define DEBUG GNUNET_EXTRA_LOGGING
-
-#define VERBOSE GNUNET_NO
-
 /**
  * Closure for 'add_to_buf'.
  */

Modified: gnunet/src/hello/test_hello.c
===================================================================
--- gnunet/src/hello/test_hello.c       2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/hello/test_hello.c       2012-11-04 21:01:22 UTC (rev 24693)
@@ -25,11 +25,6 @@
 #include "platform.h"
 #include "gnunet_hello_lib.h"
 
-#define DEBUG GNUNET_NO
-
-#define VERBOSE GNUNET_NO
-
-
 static size_t
 my_addr_gen (void *cls, size_t max, void *buf)
 {
@@ -37,9 +32,8 @@
   size_t ret;
   struct GNUNET_HELLO_Address address;
 
-#if DEBUG
-  FPRINTF (stderr, "DEBUG: my_addr_gen called with i = %d\n", *i);
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+             "DEBUG: my_addr_gen called with i = %d\n", *i);
   if (0 == *i)
     return 0;
   memset (&address.peer, 0, sizeof (struct GNUNET_PeerIdentity));
@@ -60,10 +54,9 @@
 {
   unsigned int *i = cls;
 
-#if DEBUG
-  FPRINTF (stderr, "DEBUG: check_addr called with i = %d and addrlen = %u\n",
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "DEBUG: check_addr called with i = %d and addrlen = %u\n",
            *i, (unsigned int) address->address_length);
-#endif
   GNUNET_assert (address->address_length > 0);
   GNUNET_assert (*i & (1 << (address->address_length - 1)));
   *i -= (1 << (address->address_length - 1));
@@ -81,10 +74,9 @@
 {
   unsigned int *i = cls;
 
-#if DEBUG
-  FPRINTF (stderr, "DEBUG: remove_some called with i = %d and addrlen = %u\n",
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "DEBUG: remove_some called with i = %d and addrlen = %u\n",
            *i, (unsigned int) address->address_length);
-#endif
   GNUNET_assert (address->address_length > 0);
   if (*i & (1 << (address->address_length - 1)))
   {
@@ -109,65 +101,56 @@
   GNUNET_log_setup ("test-hello", "DEBUG", NULL);
   startup_time = GNUNET_TIME_absolute_get ();
   memset (&publicKey, 42, sizeof (publicKey));
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing HELLO creation (without addresses)...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Testing HELLO creation (without addresses)...\n");
   i = 0;
   msg1 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i);
   GNUNET_assert (msg1 != NULL);
   GNUNET_assert (0 < GNUNET_HELLO_size (msg1));
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing address iteration (empty set)...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Testing address iteration (empty set)...\n");
   GNUNET_assert (NULL ==
                  GNUNET_HELLO_iterate_addresses (msg1, GNUNET_NO, &check_addr,
                                                  &i));
-
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing HELLO creation (with one address)...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing HELLO creation (with one address)...\n");
   i = 1;
   msg2 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i);
   GNUNET_assert (msg2 != NULL);
   GNUNET_assert (GNUNET_HELLO_size (msg1) < GNUNET_HELLO_size (msg2));
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing address iteration (one address)...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing address iteration (one address)...\n");
   i = 1;
   GNUNET_assert (NULL ==
                  GNUNET_HELLO_iterate_addresses (msg2, GNUNET_NO, &check_addr,
                                                  &i));
   GNUNET_assert (i == 0);
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing get_key from HELLO...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing get_key from HELLO...\n");
   GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_key (msg2, &pk));
   GNUNET_assert (0 == memcmp (&publicKey, &pk, sizeof (pk)));
   GNUNET_free (msg1);
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing HELLO creation (with two addresses)...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing HELLO creation (with two addresses)...\n");
   i = 2;
   msg3 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i);
   GNUNET_assert (msg3 != NULL);
   GNUNET_assert (GNUNET_HELLO_size (msg2) < GNUNET_HELLO_size (msg3));
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing address iteration (two addresses)...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing address iteration (two addresses)...\n");
   i = 3;
   GNUNET_assert (NULL ==
                  GNUNET_HELLO_iterate_addresses (msg3, GNUNET_NO, &check_addr,
                                                  &i));
   GNUNET_assert (i == 0);
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing HELLO merge...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing HELLO merge...\n");
   msg1 = GNUNET_HELLO_merge (msg2, msg3);
   GNUNET_assert (GNUNET_HELLO_size (msg1) == GNUNET_HELLO_size (msg3));
 
@@ -178,9 +161,8 @@
   GNUNET_assert (i == 0);
   GNUNET_free (msg1);
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing address iteration to copy HELLO...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing address iteration to copy HELLO...\n");
   i = 2;
   msg1 = GNUNET_HELLO_iterate_addresses (msg3, GNUNET_YES, &remove_some, &i);
   GNUNET_assert (msg1 != NULL);
@@ -192,9 +174,8 @@
   GNUNET_assert (i == 0);
   GNUNET_free (msg1);
 
-#if VERBOSE
-  FPRINTF (stderr, "%s",  "Testing delta address iteration...\n");
-#endif
+  GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG,
+          "Testing delta address iteration...\n");
   i = 2;
   GNUNET_HELLO_iterate_new_addresses (msg3, msg2, startup_time, &check_addr,
                                       &i);

Modified: gnunet/src/hostlist/gnunet-daemon-hostlist.c
===================================================================
--- gnunet/src/hostlist/gnunet-daemon-hostlist.c        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/hostlist/gnunet-daemon-hostlist.c        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -343,7 +343,7 @@
        GNUNET_PROGRAM_run (argc, argv, "hostlist",
                            _("GNUnet hostlist server and client"), options,
                            &run, NULL)) ? 0 : 1;
-
+  GNUNET_free ((void*) argv);
   return ret;
 }
 

Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf  2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf  2012-11-04 
21:01:22 UTC (rev 24693)
@@ -25,7 +25,6 @@
 [transport]
 PORT = 12965
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-DEBUG = NO
 
 [core]
 PORT = 12970

Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2012-11-04 
21:01:22 UTC (rev 24693)
@@ -28,11 +28,6 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_transport_service.h"
 
-#define VERBOSE GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
-
 /**
  * How long until we give up on transmitting the message?
  */
@@ -48,9 +43,7 @@
   struct GNUNET_TRANSPORT_Handle *th;
   struct GNUNET_MessageHeader *hello;
   struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
-#if START_ARM
   struct GNUNET_OS_Process *arm_proc;
-#endif
 };
 
 static struct PeerContext p1;
@@ -112,9 +105,6 @@
 {
   if (peer == NULL)
     return;
-#if VERBOSE
-  FPRINTF (stderr, "Peer %s connected\n", GNUNET_i2s (peer));
-#endif
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n");
   ok = 0;
   if (timeout_task != GNUNET_SCHEDULER_NO_TASK)
@@ -145,12 +135,10 @@
 
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
-#if START_ARM
   p->arm_proc =
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, 
NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
-#endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   p->th =
       GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL);
@@ -165,7 +153,6 @@
 {
   struct PeerContext *p = cls;
 
-#if START_ARM
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n");
   if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
@@ -175,7 +162,6 @@
               GNUNET_OS_process_get_pid (p->arm_proc));
   GNUNET_OS_process_destroy (p->arm_proc);
   p->arm_proc = NULL;
-#endif
   GNUNET_CONFIGURATION_destroy (p->cfg);
 }
 
@@ -218,9 +204,6 @@
 {
   char *const argv[] = { "test-gnunet-daemon-hostlist",
     "-c", "test_gnunet_daemon_hostlist_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -244,11 +227,7 @@
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2");
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3");
   GNUNET_log_setup ("test-gnunet-daemon-hostlist",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   ret = check ();
   if (ret == 0)

Modified: gnunet/src/hostlist/test_hostlist_defaults.conf
===================================================================
--- gnunet/src/hostlist/test_hostlist_defaults.conf     2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/hostlist/test_hostlist_defaults.conf     2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -67,4 +67,4 @@
 AUTOSTART = NO
 
 [nat]
-RETURN_LOCAL_ADDRESSES = YES
\ No newline at end of file
+RETURN_LOCAL_ADDRESSES = YES

Modified: gnunet/src/include/platform.h
===================================================================
--- gnunet/src/include/platform.h       2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/include/platform.h       2012-11-04 21:01:22 UTC (rev 24693)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff 
(and other contributing authors)
+     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2012 Christian 
Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -20,14 +20,12 @@
 
 /**
  * @file include/platform.h
- * @brief plaform specifics
- *
+ * @brief plaform specific includes and defines
  * @author Nils Durner
- *
+ * @author Christian Grothoff
  * This file should never be included by installed
- * header files (thos starting with "gnunet_").
+ * header files (those starting with "gnunet_").
  */
-
 #ifndef PLATFORM_H
 #define PLATFORM_H
 
@@ -141,7 +139,7 @@
 #ifdef SOMEBSD
 #include <net/if.h>
 #endif
-#ifdef GNUNET_freeBSD
+#ifdef FREEBSD
 #include <semaphore.h>
 #endif
 #ifdef DARWIN

Modified: gnunet/src/integration-tests/confs/c_no_nat_client.conf
===================================================================
--- gnunet/src/integration-tests/confs/c_no_nat_client.conf     2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/integration-tests/confs/c_no_nat_client.conf     2012-11-04 
21:01:22 UTC (rev 24693)
@@ -140,7 +140,6 @@
 ATS_EXEC_INTERVAL = 30000
 
 [transport]
-#DEBUG = YES
 #PREFIX = valgrind --alloc-fn=GNUNET_xmalloc_ 
--alloc-fn=GNUNET_xmalloc_unchecked_ --alloc-fn=GNUNET_xrealloc_ 
--alloc-fn=GNUNET_xgrow_ --massif-out-file=massif_client.out --tool=massif
 AUTOSTART = YES
 PORT = 20029

Modified: gnunet/src/integration-tests/confs/c_no_nat_client_http.conf
===================================================================
--- gnunet/src/integration-tests/confs/c_no_nat_client_http.conf        
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/integration-tests/confs/c_no_nat_client_http.conf        
2012-11-04 21:01:22 UTC (rev 24693)
@@ -141,7 +141,6 @@
 
 [transport]
 PREFIX = valgrind --leak-check=full
-#DEBUG = YES
 AUTOSTART = YES
 PORT = 20029
 HOSTNAME = localhost

Modified: gnunet/src/integration-tests/confs/c_no_nat_client_unix.conf
===================================================================
--- gnunet/src/integration-tests/confs/c_no_nat_client_unix.conf        
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/integration-tests/confs/c_no_nat_client_unix.conf        
2012-11-04 21:01:22 UTC (rev 24693)
@@ -141,7 +141,6 @@
 
 [transport]
 PREFIX = valgrind --leak-check=full
-#DEBUG = YES
 AUTOSTART = YES
 PORT = 20029
 HOSTNAME = localhost

Modified: gnunet/src/integration-tests/connection_watchdog.c
===================================================================
--- gnunet/src/integration-tests/connection_watchdog.c  2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/integration-tests/connection_watchdog.c  2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -1097,11 +1097,12 @@
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
-
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "cn",
-                              gettext_noop ("help text"), options, &run,
-                              NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "cn",
+                            gettext_noop ("help text"), options, &run,
+                            NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of connection_watchdog.c */

Modified: gnunet/src/lockmanager/test_lockmanager_api.conf
===================================================================
--- gnunet/src/lockmanager/test_lockmanager_api.conf    2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/lockmanager/test_lockmanager_api.conf    2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -1,5 +1,4 @@
 [lockmanager]
-DEBUG = YES
 AUTOSTART = NO 
 PORT = 12112
 ACCEPT_FROM = 127.0.0.1;
@@ -28,7 +27,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -44,7 +42,6 @@
 [arm]
 DEFAULTSERVICES = core lockmanager
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s
@@ -53,7 +50,6 @@
 [TESTING]
 NUM_PEERS = 5
 WEAKRANDOM = YES
-DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/mesh/gnunet-regex-profiler.c
===================================================================
--- gnunet/src/mesh/gnunet-regex-profiler.c     2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/mesh/gnunet-regex-profiler.c     2012-11-04 21:01:22 UTC (rev 
24693)
@@ -1872,6 +1872,7 @@
       GNUNET_PROGRAM_run (argc, argv, "gnunet-regex-profiler [OPTIONS] 
hosts-file policy-dir search-strings-file",
                           _("Profiler for regex/mesh"),
                           options, &run, NULL);
+  GNUNET_free ((void*) argv);
   if (GNUNET_OK != ret)
     return ret;
   if (GNUNET_OK != result)

Modified: gnunet/src/mesh/regex_profiler_test.conf
===================================================================
--- gnunet/src/mesh/regex_profiler_test.conf    2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/mesh/regex_profiler_test.conf    2012-11-04 21:01:22 UTC (rev 
24693)
@@ -26,7 +26,6 @@
 [arm]
 DEFAULTSERVICES = core mesh dht statistics
 PORT = 12003
-DEBUG = NO
 
 [fs]
 AUTOSTART = NO
@@ -40,7 +39,6 @@
 [transport]
 AUTOSTART = YES
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24;
 ACCEPT_FROM6 = ::1;
 NEIGHBOUR_LIMIT = 50
@@ -67,7 +65,6 @@
 [TESTING]
 NUM_PEERS = 5
 WEAKRANDOM = YES
-DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/mesh/test_mesh.conf
===================================================================
--- gnunet/src/mesh/test_mesh.conf      2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/mesh/test_mesh.conf      2012-11-04 21:01:22 UTC (rev 24693)
@@ -5,7 +5,6 @@
 AUTOSTART = NO
 
 [mesh]
-DEBUG = YES
 AUTOSTART = YES
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
@@ -27,7 +26,6 @@
 PORT = 10012
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -43,7 +41,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -59,7 +56,6 @@
 [arm]
 DEFAULTSERVICES = core
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s

Modified: gnunet/src/mesh/test_mesh_2dtorus.c
===================================================================
--- gnunet/src/mesh/test_mesh_2dtorus.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/mesh/test_mesh_2dtorus.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -25,7 +25,6 @@
 #include "platform.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE GNUNET_YES
 #define REMOVE_DIR GNUNET_YES
 
 /**
@@ -107,13 +106,11 @@
                 "test: Shutdown of peers failed! (%s)\n", emsg);
     ok--;
   }
-#if VERBOSE
   else
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "test: All peers successfully shut down!\n");
   }
-#endif
   GNUNET_CONFIGURATION_destroy (testing_cfg);
 }
 
@@ -121,10 +118,7 @@
 static void
 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n");
-#endif
-
   GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
@@ -201,15 +195,9 @@
     GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
     return;
   }
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              
"************************************************************\n");
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "test: Peer Group started successfully!\n");
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n",
+              "test: Peer Group started successfully with %u connections\n",
               total_connections);
-#endif
-
   peers_running = GNUNET_TESTING_daemons_running (pg);
   if (0 < failed_connections)
   {
@@ -287,19 +275,11 @@
   testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
 
   GNUNET_log_setup ("test_mesh_2dtorus",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
 
-#if VERBOSE
+
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
-  GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old",
-                                         "use_progressbars", "YES");
-#endif
-
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old",
                                              "num_peers", &num_peers))
@@ -342,10 +322,6 @@
     argv[0],
     "-c",
     "test_mesh_2dtorus.conf",
-#if VERBOSE
-    "-L",
-    "DEBUG",
-#endif
     NULL
   };
 

Modified: gnunet/src/mesh/test_mesh_2dtorus.conf
===================================================================
--- gnunet/src/mesh/test_mesh_2dtorus.conf      2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/mesh/test_mesh_2dtorus.conf      2012-11-04 21:01:22 UTC (rev 
24693)
@@ -4,14 +4,12 @@
 [arm]
 PORT = 10010
 DEFAULTSERVICES = core dht mesh
-#DEBUG = YES
 
 [statistics]
 AUTOSTART = YES
 PORT = 10000
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -53,7 +51,6 @@
 
 [mesh]
 PORT = 10005
-DEBUG=YES
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
 # PREFIX = valgrind --leak-check=full
@@ -78,7 +75,6 @@
 F2F = NO
 CONNECT_TIMEOUT = 600 s
 CONNECT_ATTEMPTS = 2
-DEBUG = YES
 HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/mesh/test_mesh_path.conf
===================================================================
--- gnunet/src/mesh/test_mesh_path.conf 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/mesh/test_mesh_path.conf 2012-11-04 21:01:22 UTC (rev 24693)
@@ -5,7 +5,6 @@
 AUTOSTART = NO
 
 [mesh]
-DEBUG = YES
 AUTOSTART = YES
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
@@ -14,7 +13,6 @@
 # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -30,7 +28,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -56,7 +53,6 @@
 [arm]
 DEFAULTSERVICES = core
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s

Modified: gnunet/src/mesh/test_mesh_regex.c
===================================================================
--- gnunet/src/mesh/test_mesh_regex.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/mesh/test_mesh_regex.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -27,7 +27,6 @@
 #include "gnunet_testing_lib.h"
 #include "gnunet_mesh_service.h"
 
-#define VERBOSE GNUNET_YES
 #define REMOVE_DIR GNUNET_YES
 #define MESH_REGEX_PEERS 4
 
@@ -159,13 +158,11 @@
     for (i = 0; i < MESH_REGEX_PEERS; i++)
       ok[i] = GNUNET_NO;
   }
-#if VERBOSE
   else
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "test: All peers successfully shut down!\n");
   }
-#endif
   GNUNET_CONFIGURATION_destroy (testing_cfg);
 }
 
@@ -180,9 +177,7 @@
 static void
 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n");
-#endif
   shutdown_handle = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
@@ -407,13 +402,9 @@
     GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
     return;
   }
-#if VERBOSE
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "test: Peer Group started successfully!\n");
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "test: Have %u connections\n",
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Peer Group started successfully with %u connections\n",
               total_connections);
-#endif
-
   peers_running = GNUNET_TESTING_daemons_running (pg);
   if (0 < failed_connections)
   {
@@ -519,19 +510,9 @@
   testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
 
   GNUNET_log_setup ("test_mesh_regex",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
-
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
-  GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old",
-                                         "use_progressbars", "YES");
-#endif
-
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old",
                                              "num_peers", &num_peers))
@@ -574,10 +555,6 @@
     argv[0],
     "-c",
     "test_mesh_2dtorus.conf",
-#if VERBOSE
-    "-L",
-    "DEBUG",
-#endif
     NULL
   };
   int result;

Modified: gnunet/src/mesh/test_mesh_small.c
===================================================================
--- gnunet/src/mesh/test_mesh_small.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/mesh/test_mesh_small.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -29,7 +29,6 @@
 #include <gauger.h>
 
 
-#define VERBOSE GNUNET_YES
 #define REMOVE_DIR GNUNET_YES
 
 struct MeshPeer
@@ -289,18 +288,14 @@
 {
   if (emsg != NULL)
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Shutdown of peers failed!\n");
-#endif
     ok--;
   }
   else
   {
-#if VERBOSE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "All peers successfully shut down!\n");
-#endif
   }
   GNUNET_CONFIGURATION_destroy (testing_cfg);
 }
@@ -315,11 +310,8 @@
 static void
 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Ending test.\n");
-#endif
-
   if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
   {
     GNUNET_SCHEDULER_cancel (disconnect_task);
@@ -877,7 +869,6 @@
   }
   app = (GNUNET_MESH_ApplicationType) 0;
 
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "connecting to mesh service of peer %s\n",
               GNUNET_i2s (&d1->id));
@@ -890,7 +881,6 @@
                 "connecting to mesh service of peer %s\n",
                 GNUNET_i2s (&d3->id));
   }
-#endif
   h1 = GNUNET_MESH_connect (d1->cfg, (void *) 1L, NULL, &tunnel_cleaner,
                             handlers, &app);
   h2 = GNUNET_MESH_connect (d2->cfg, (void *) 2L, &incoming_tunnel,
@@ -943,16 +933,9 @@
     GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
     return;
   }
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              
"************************************************************\n");
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Peer Group started successfully!\n");
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Have %u connections\n",
+              "Peer Group started successfully with %u connections\n",
               total_connections);
-#endif
-
   if (data_file != NULL)
   {
     buf = NULL;
@@ -1041,20 +1024,11 @@
   testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
 
   GNUNET_log_setup ("test_mesh_small",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
 
-#if VERBOSE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Starting daemons.\n");
-  GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old",
-                                         "use_progressbars", "YES");
-#endif
-
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old",
                                              "num_peers", &num_peers))
@@ -1152,10 +1126,6 @@
     argv[0],
     "-c",
     "test_mesh_small.conf",
-#if VERBOSE
-    "-L",
-    "DEBUG",
-#endif
     NULL
   };
   int argc2 = (sizeof (argv2) / sizeof (char *)) - 1;
@@ -1193,9 +1163,6 @@
     test_name = "speed ack";
     ok_goal = TOTAL_PACKETS * 2 + 3;
     argv2 [3] = NULL; // remove -L DEBUG
-#if VERBOSE
-    argc2 -= 2;
-#endif
   }
   else if (strstr (argv[0], "test_mesh_small_speed") != NULL)
   {

Modified: gnunet/src/mesh/test_mesh_small.conf
===================================================================
--- gnunet/src/mesh/test_mesh_small.conf        2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/mesh/test_mesh_small.conf        2012-11-04 21:01:22 UTC (rev 
24693)
@@ -3,7 +3,6 @@
 
 [mesh]
 PORT = 10005
-DEBUG = YES
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
 REFRESH_PATH_TIME = 5 s
@@ -19,14 +18,12 @@
 [arm]
 PORT = 10010
 DEFAULTSERVICES = core dht mesh
-#DEBUG = YES
 
 [statistics]
 AUTOSTART = YES
 PORT = 10000
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -90,7 +87,6 @@
 F2F = NO
 CONNECT_TIMEOUT = 660 s
 CONNECT_ATTEMPTS = 2
-DEBUG = YES
 HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/mesh/test_mesh_tree_api.c
===================================================================
--- gnunet/src/mesh/test_mesh_tree_api.c        2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/mesh/test_mesh_tree_api.c        2012-11-04 21:01:22 UTC (rev 
24693)
@@ -35,13 +35,11 @@
 #define MESH_TUNNEL_TREE_C
 #endif
 
-#define VERBOSE 1
+static int failed;
+static int cb_call;
+static struct GNUNET_PeerIdentity *pi[10];
+static struct MeshTunnelTree *tree;
 
-int failed;
-int cb_call;
-struct GNUNET_PeerIdentity *pi[10];
-struct MeshTunnelTree *tree;
-
 static void
 cb (void *cls, GNUNET_PEER_Id peer_id)
 {
@@ -155,11 +153,7 @@
   failed = 0;
   cb_call = 0;
   GNUNET_log_setup ("test_mesh_api_tree",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   for (i = 0; i < 10; i++)
   {

Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c     2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/namestore/gnunet-namestore.c     2012-11-04 21:01:22 UTC (rev 
24693)
@@ -718,8 +718,11 @@
                          _("GNUnet zone manipulation tool"), 
                          options,
                          &run, NULL))
+  {
+    GNUNET_free ((void*) argv);
     return 1;
-
+  }
+  GNUNET_free ((void*) argv);
   return ret;
 }
 

Modified: gnunet/src/namestore/namestore_api.c
===================================================================
--- gnunet/src/namestore/namestore_api.c        2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/namestore/namestore_api.c        2012-11-04 21:01:22 UTC (rev 
24693)
@@ -1097,8 +1097,8 @@
 {
   size_t rd_ser_len;
   size_t name_len;
-  char * name_tmp;
-  char * rd_ser;
+  char *name_tmp;
+  char *rd_ser;
   struct GNUNET_CRYPTO_RsaSignaturePurpose *sig_purpose;
   struct GNUNET_TIME_AbsoluteNBO *expire_tmp;
   struct GNUNET_TIME_AbsoluteNBO expire_nbo = GNUNET_TIME_absolute_hton 
(freshness);

Modified: gnunet/src/namestore/test_namestore_record_serialization.c
===================================================================
--- gnunet/src/namestore/test_namestore_record_serialization.c  2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/namestore/test_namestore_record_serialization.c  2012-11-04 
21:01:22 UTC (rev 24693)
@@ -26,8 +26,6 @@
 #include "gnunet_namestore_service.h"
 #include "namestore.h"
 
-#define VERBOSE GNUNET_NO
-
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
 
 static int res;

Modified: gnunet/src/nat/gnunet-nat-server.c
===================================================================
--- gnunet/src/nat/gnunet-nat-server.c  2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/nat/gnunet-nat-server.c  2012-11-04 21:01:22 UTC (rev 24693)
@@ -320,7 +320,11 @@
       GNUNET_PROGRAM_run (argc, argv, "gnunet-nat-server [options] PORT",
                           _("GNUnet NAT traversal test helper daemon"), 
options,
                           &run, NULL))
+  {
+    GNUNET_free ((void*) argv);
     return 1;
+  }
+  GNUNET_free ((void*) argv);
   return 0;
 }
 

Modified: gnunet/src/nat/test_nat_mini.c
===================================================================
--- gnunet/src/nat/test_nat_mini.c      2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/nat/test_nat_mini.c      2012-11-04 21:01:22 UTC (rev 24693)
@@ -35,9 +35,6 @@
 #include "gnunet_scheduler_lib.h"
 #include "gnunet_nat_lib.h"
 
-
-#define VERBOSE GNUNET_NO
-
 /* Time to wait before stopping NAT, in seconds */
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
 
@@ -104,20 +101,12 @@
     "-c",
     "test_nat_data.conf",
     "-L",
-#if VERBOSE
-    "DEBUG",
-#else
     "WARNING",
-#endif
     NULL
   };
 
   GNUNET_log_setup ("test-nat-mini",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,

Modified: gnunet/src/nse/nse_profiler_test.conf
===================================================================
--- gnunet/src/nse/nse_profiler_test.conf       2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/nse/nse_profiler_test.conf       2012-11-04 21:01:22 UTC (rev 
24693)
@@ -8,7 +8,6 @@
 #BINARY = 
/home/mrwiggles/documents/research/gnunet/gnunet-ng/src/nse/.libs/gnunet-service-nse
 #PREFIX = valgrind --leak-check=full --log-file=valgrind_nse.%p
 AUTOSTART = NO
-DEBUG = YES
 # Overriding network settings for faster testing (do NOT use
 # these values in production just because they are here)
 WORKDELAY = 60 s
@@ -20,7 +19,6 @@
 PORT = 0
 DEFAULTSERVICES = core
 UNIXPATH = /tmp/test-nse-service-arm.unix
-#DEBUG = YES
 
 [statistics]
 AUTOSTART = YES
@@ -116,7 +114,6 @@
 F2F = NO
 CONNECT_TIMEOUT = 360 s
 CONNECT_ATTEMPTS = 3
-DEBUG = YES
 #HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 HOSTKEYSFILE = hostkeys.dat
 MAX_CONCURRENT_SSH = 20

Modified: gnunet/src/nse/test_nse.conf
===================================================================
--- gnunet/src/nse/test_nse.conf        2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/nse/test_nse.conf        2012-11-04 21:01:22 UTC (rev 24693)
@@ -8,7 +8,6 @@
 #BINARY = 
/home/mrwiggles/documents/research/gnunet/gnunet-ng/src/nse/.libs/gnunet-service-nse
 #PREFIX = valgrind --leak-check=full --log-file=valgrind_nse.%p
 AUTOSTART = YES
-DEBUG = NO
 PROOFFILE = $SERVICEHOME/proof.nse
 # Overriding network settings for faster testing (do NOT use
 # these values in production just because they are here)
@@ -23,7 +22,6 @@
 PORT = 22354
 DEFAULTSERVICES = nse core
 UNIXPATH = /tmp/test-nse-service-arm.unix
-#DEBUG = YES
 
 [fs]
 AUTOSTART = NO
@@ -66,7 +64,6 @@
 F2F = NO
 CONNECT_TIMEOUT = 60 s
 CONNECT_ATTEMPTS = 3
-#DEBUG = YES
 HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 20
 USE_PROGRESSBARS = YES

Modified: gnunet/src/peerinfo/test_peerinfo_api_data.conf
===================================================================
--- gnunet/src/peerinfo/test_peerinfo_api_data.conf     2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/peerinfo/test_peerinfo_api_data.conf     2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -3,7 +3,6 @@
 
 [peerinfo]
 PORT = 22354
-DEBUG = NO
 
 [dns]
 AUTOSTART = NO

Modified: gnunet/src/peerinfo-tool/gnunet-peerinfo.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-peerinfo.c  2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/peerinfo-tool/gnunet-peerinfo.c  2012-11-04 21:01:22 UTC (rev 
24693)
@@ -959,14 +959,17 @@
      1, &GNUNET_GETOPT_set_string, &put_uri},
     GNUNET_GETOPT_OPTION_END
   };
+  int ret;
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-peerinfo",
-                              gettext_noop ("Print information about peers."),
-                              options, &run, NULL)) ? 0 : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-peerinfo",
+                            gettext_noop ("Print information about peers."),
+                            options, &run, NULL)) ? 0 : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-peerinfo.c */

Modified: gnunet/src/pt/gnunet-daemon-pt.c
===================================================================
--- gnunet/src/pt/gnunet-daemon-pt.c    2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/pt/gnunet-daemon-pt.c    2012-11-04 21:01:22 UTC (rev 24693)
@@ -966,15 +966,17 @@
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
     GNUNET_GETOPT_OPTION_END
   };
+  int ret;
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
-
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-pt",
-                              gettext_noop
-                              ("Daemon to run to perform IP protocol 
translation to GNUnet"),
-                              options, &run, NULL)) ? 0 : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-pt",
+                            gettext_noop
+                            ("Daemon to run to perform IP protocol translation 
to GNUnet"),
+                            options, &run, NULL)) ? 0 : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 

Modified: gnunet/src/regex/test_regex_graph_api.c
===================================================================
--- gnunet/src/regex/test_regex_graph_api.c     2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/regex/test_regex_graph_api.c     2012-11-04 21:01:22 UTC (rev 
24693)
@@ -37,56 +37,47 @@
  *
  * @return 0 if ok, non 0 on error.
  */
-int
+static int
 filecheck (const char *filename)
 {
   int error = 0;
-  FILE *fp = NULL;
+  FILE *fp;
 
   // Check if file was created and delete it again
-  fp = fopen (filename, "r");
-
-  if (NULL == fp)
+  if (NULL == (fp = fopen (filename, "r")))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not find graph %s\n", 
filename);
-    return ++error;
+    return 1;
   }
 
-  fseek (fp, 0L, SEEK_END);
+  GNUNET_break (0 == fseek (fp, 0L, SEEK_END));
   if (1 > ftell (fp))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Graph writing failed, got empty file (%s)!\n", filename);
-    error++;
+                "Graph writing failed, got empty file (%s)!\n", 
+               filename);
+    error = 2;
   }
+  
+  GNUNET_assert (0 == fclose (fp));
 
-  error += fclose (fp);
-
   if (!KEEP_FILES)
   {
     if (0 != unlink (filename))
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not remove temp files 
(%s)\n",
-                  filename);
-    }
+      GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 
+                               "unlink", filename);
   }
-
-
   return error;
 }
 
+
 int
 main (int argc, char *argv[])
 {
-  GNUNET_log_setup ("test-regex", "WARNING", NULL);
-
   int error;
   struct GNUNET_REGEX_Automaton *a;
   unsigned int i;
   const char *filename = "test_graph.dot";
-
-  error = 0;
-
   const char *regex[12] = {
     "ab(c|d)+c*(a(b|c)+d)+(bla)+",
     "(bla)*",
@@ -103,6 +94,8 @@
     
"PADPADPADPADPADPabcdefghixxxxxxxxxxxxxjklmnop*qstoisdjfguisdfguihsdfgbdsuivggsd"
   };
 
+  GNUNET_log_setup ("test-regex", "WARNING", NULL);
+  error = 0;
   for (i = 0; i < 12; i++)
   {
     // Check NFA graph creation

Modified: gnunet/src/statistics/gnunet-statistics.c
===================================================================
--- gnunet/src/statistics/gnunet-statistics.c   2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/statistics/gnunet-statistics.c   2012-11-04 21:01:22 UTC (rev 
24693)
@@ -277,19 +277,19 @@
      &GNUNET_GETOPT_set_uint, &remote_port},
     GNUNET_GETOPT_OPTION_END
   };
-
   remote_port = 0;
   remote_host = NULL;
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-statistics [options 
[value]]",
-                              gettext_noop
-                              ("Print statistics about GNUnet operations."),
-                              options, &run, NULL)) ? ret : 1;
-
-  GNUNET_free_non_null(remote_host);
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-statistics [options [value]]",
+                            gettext_noop
+                            ("Print statistics about GNUnet operations."),
+                            options, &run, NULL)) ? ret : 1;
+  GNUNET_free_non_null (remote_host);
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-statistics.c */

Modified: gnunet/src/statistics/test_statistics_api_data.conf
===================================================================
--- gnunet/src/statistics/test_statistics_api_data.conf 2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/statistics/test_statistics_api_data.conf 2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -4,13 +4,11 @@
 [statistics]
 PORT = 22353
 UNIXPATH = /tmp/test-statistics-service-statistics.unix
-#DEBUG = YES
 
 [arm]
 PORT = 22354
 DEFAULTSERVICES = 
 UNIXPATH = /tmp/test-statistics-service-arm.unix
-# DEBUG = YES
 
 [fs]
 AUTOSTART = NO

Modified: gnunet/src/stream/test_stream_2peers_halfclose.c
===================================================================
--- gnunet/src/stream/test_stream_2peers_halfclose.c    2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/stream/test_stream_2peers_halfclose.c    2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -23,17 +23,12 @@
  * @brief Testcases for Stream API halfclosed connections between 2 peers
  * @author Sree Harsha Totakura
  */
-
-#include <string.h>
-
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_testbed_service.h"
 #include "gnunet_mesh_service.h"
 #include "gnunet_stream_lib.h"
 
-#define VERBOSE 1
-
 /**
  * Number of peers
  */

Modified: gnunet/src/stream/test_stream_local.conf
===================================================================
--- gnunet/src/stream/test_stream_local.conf    2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/stream/test_stream_local.conf    2012-11-04 21:01:22 UTC (rev 
24693)
@@ -11,7 +11,6 @@
 AUTOSTART = NO
 
 [mesh]
-DEBUG = YES
 AUTOSTART = YES
 ACCEPT_FROM = 127.0.0.1;
 HOSTNAME = localhost
@@ -20,7 +19,6 @@
 # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -36,7 +34,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -52,7 +49,6 @@
 [arm]
 DEFAULTSERVICES = core lockmanager
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s
@@ -63,7 +59,6 @@
 
 [testing_old]
 NUM_PEERS = 5
-DEBUG = YES
 HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/template/gnunet-template.c
===================================================================
--- gnunet/src/template/gnunet-template.c       2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/template/gnunet-template.c       2012-11-04 21:01:22 UTC (rev 
24693)
@@ -62,14 +62,15 @@
     /* FIMXE: add options here */
     GNUNET_GETOPT_OPTION_END
   };
-
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-template",
-                              gettext_noop ("help text"), options, &run,
-                              NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-template",
+                            gettext_noop ("help text"), options, &run,
+                            NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-template.c */

Modified: gnunet/src/testbed/gnunet-testbed-profiler.c
===================================================================
--- gnunet/src/testbed/gnunet-testbed-profiler.c        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/testbed/gnunet-testbed-profiler.c        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -817,6 +817,7 @@
       GNUNET_PROGRAM_run (argc, argv, "gnunet-testbed-profiler [OPTIONS] 
hosts-file",
                           _("Profiler for testbed"),
                           options, &run, NULL);
+  GNUNET_free ((void*) argv);
   if (GNUNET_OK != ret)
     return ret;
   if (GNUNET_OK != result)

Modified: gnunet/src/testbed/test_testbed_api.conf
===================================================================
--- gnunet/src/testbed/test_testbed_api.conf    2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/testbed/test_testbed_api.conf    2012-11-04 21:01:22 UTC (rev 
24693)
@@ -29,7 +29,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -46,7 +45,6 @@
 [arm]
 DEFAULTSERVICES = core transport
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s
@@ -55,7 +53,6 @@
 [TESTING]
 NUM_PEERS = 5
 WEAKRANDOM = YES
-DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/testbed/test_testbed_api_testbed_run_topologyclique.conf
===================================================================
--- gnunet/src/testbed/test_testbed_api_testbed_run_topologyclique.conf 
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/testbed/test_testbed_api_testbed_run_topologyclique.conf 
2012-11-04 21:01:22 UTC (rev 24693)
@@ -29,7 +29,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -46,7 +45,6 @@
 [arm]
 DEFAULTSERVICES = core transport
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s
@@ -55,7 +53,6 @@
 [TESTING]
 NUM_PEERS = 5
 WEAKRANDOM = YES
-DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/testbed/test_testbed_api_testbed_run_topologyline.conf
===================================================================
--- gnunet/src/testbed/test_testbed_api_testbed_run_topologyline.conf   
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/testbed/test_testbed_api_testbed_run_topologyline.conf   
2012-11-04 21:01:22 UTC (rev 24693)
@@ -29,7 +29,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -46,7 +45,6 @@
 [arm]
 DEFAULTSERVICES = core transport
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s
@@ -55,7 +53,6 @@
 [TESTING]
 NUM_PEERS = 5
 WEAKRANDOM = YES
-DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf
===================================================================
--- gnunet/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf 
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf 
2012-11-04 21:01:22 UTC (rev 24693)
@@ -30,7 +30,6 @@
 
 [transport]
 PLUGINS = tcp
-DEBUG = NO
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 NEIGHBOUR_LIMIT = 50
@@ -47,7 +46,6 @@
 [arm]
 DEFAULTSERVICES = core transport
 PORT = 12366
-DEBUG = NO
 
 [transport-tcp]
 TIMEOUT = 300 s
@@ -56,7 +54,6 @@
 [TESTING]
 NUM_PEERS = 5
 WEAKRANDOM = YES
-DEBUG = YES
 HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/testing/gnunet-testing.c
===================================================================
--- gnunet/src/testing/gnunet-testing.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/testing/gnunet-testing.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -209,14 +209,15 @@
      GNUNET_YES, &GNUNET_GETOPT_set_string, &create_cfg_template},
     GNUNET_GETOPT_OPTION_END
   };
-
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-testing",
-                              gettext_noop ("Command line tool to access the 
testing library"), options, &run,
-                              NULL)) ? ret : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-testing",
+                            gettext_noop ("Command line tool to access the 
testing library"), options, &run,
+                            NULL)) ? ret : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-testing.c */

Modified: gnunet/src/testing_old/Makefile.am
===================================================================
--- gnunet/src/testing_old/Makefile.am  2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/testing_old/Makefile.am  2012-11-04 21:01:22 UTC (rev 24693)
@@ -80,12 +80,13 @@
  test_testing_topology_scale_free 
 
 if ENABLE_TEST_RUN 
-TESTS = \
- test_testing \
- test_testing_connect \
- test_testing_reconnect \
- test_testing_group \
- test_testing_peergroup 
+# Don't bother to test old-testing at this point
+#TESTS = \
+# test_testing \
+# test_testing_connect \
+# test_testing_reconnect \
+# test_testing_group \
+# test_testing_peergroup 
 endif
 
 

Modified: gnunet/src/testing_old/test_testing_2dtorus.conf
===================================================================
--- gnunet/src/testing_old/test_testing_2dtorus.conf    2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/testing_old/test_testing_2dtorus.conf    2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -5,14 +5,12 @@
 [arm]
 PORT = 10010
 DEFAULTSERVICES = core
-#DEBUG = YES
 
 [statistics]
 AUTOSTART = YES
 PORT = 10000
 
 [dht]
-DEBUG = NO
 AUTOSTART = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
@@ -66,7 +64,6 @@
 F2F = NO
 CONNECT_TIMEOUT = 600 s
 CONNECT_ATTEMPTS = 2
-DEBUG = YES
 HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat
 MAX_CONCURRENT_SSH = 10
 USE_PROGRESSBARS = YES

Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/topology/gnunet-daemon-topology.c        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -1364,6 +1364,7 @@
                            _
                            ("GNUnet topology control (maintaining P2P mesh and 
F2F constraints)"),
                            options, &run, NULL)) ? 0 : 1;
+  GNUNET_free ((void*) argv);
   return ret;
 }
 

Modified: gnunet/src/topology/test_gnunet_daemon_topology_data.conf
===================================================================
--- gnunet/src/topology/test_gnunet_daemon_topology_data.conf   2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/topology/test_gnunet_daemon_topology_data.conf   2012-11-04 
21:01:22 UTC (rev 24693)
@@ -7,7 +7,6 @@
 [transport]
 PORT = 2665
 PLUGINS = tcp
-#DEBUG = YES
 #PREFIX = xterm -e xterm -T transport -e gdb -x cmd --args
 #PREFIX = valgrind --tool=memcheck --log-file=logs%p
 
@@ -37,10 +36,8 @@
 
 [core]
 PORT = 2670
-#DEBUG = YES
 
 [topology]
-# DEBUG = YES
 #PREFIX = valgrind --tool=memcheck
 
 [fs]

Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c     2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/transport/gnunet-transport.c     2012-11-04 21:01:22 UTC (rev 
24693)
@@ -745,13 +745,9 @@
                               ("Direct access to transport service."), options,
                               &run, NULL);
   GNUNET_free ((void *) argv);
-
   if (GNUNET_OK == res)
     return ret;
-  else
-    return 1;
-
-
+  return 1;
 }
 
 

Modified: gnunet/src/transport/template_cfg_peer1.conf
===================================================================
--- gnunet/src/transport/template_cfg_peer1.conf        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/transport/template_cfg_peer1.conf        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -39,11 +39,9 @@
 [transport]
 #PREFIX = valgrind --leak-check=full
 PORT = 12001
-#DEBUG = YES
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
 
 [ats]
-#DEBUG = YES
 WAN_QUOTA_IN = unlimited
 WAN_QUOTA_OUT = unlimited
 PORT = 12006

Modified: gnunet/src/transport/template_cfg_peer2.conf
===================================================================
--- gnunet/src/transport/template_cfg_peer2.conf        2012-11-04 18:35:07 UTC 
(rev 24692)
+++ gnunet/src/transport/template_cfg_peer2.conf        2012-11-04 21:01:22 UTC 
(rev 24693)
@@ -43,7 +43,6 @@
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
 
 [ats]
-#DEBUG = YES
 WAN_QUOTA_IN = unlimited
 WAN_QUOTA_OUT = unlimited
 PORT = 12016

Modified: 
gnunet/src/transport/test_transport_api_bidirectional_connect_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_bidirectional_connect_peer1.conf    
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_bidirectional_connect_peer1.conf    
2012-11-04 21:01:22 UTC (rev 24693)
@@ -22,7 +22,6 @@
 [transport]
 PORT = 12004
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-#DEBUG = YES
 
 [transport-tcp]
 PORT = 12005

Modified: gnunet/src/transport/test_transport_api_disconnect_tcp_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_disconnect_tcp_peer1.conf   
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_disconnect_tcp_peer1.conf   
2012-11-04 21:01:22 UTC (rev 24693)
@@ -27,5 +27,4 @@
 PORT = 12001
 PLUGINS = tcp
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-#DEBUG = YES
 

Modified: gnunet/src/transport/test_transport_api_http_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_http_peer1.conf     2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_http_peer1.conf     2012-11-04 
21:01:22 UTC (rev 24693)
@@ -22,7 +22,6 @@
 UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
 
 [transport]
-#DEBUG = YES
 PORT = 12081
 PLUGINS = http_client
 #BINARY = .libs/gnunet-service-transport

Modified: gnunet/src/transport/test_transport_api_http_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_http_peer2.conf     2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_http_peer2.conf     2012-11-04 
21:01:22 UTC (rev 24693)
@@ -25,7 +25,6 @@
 UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
 
 [transport]
-#DEBUG = YES
 PORT = 12091
 PLUGINS = http_server
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock

Modified: gnunet/src/transport/test_transport_api_http_reverse_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_http_reverse_peer1.conf     
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_http_reverse_peer1.conf     
2012-11-04 21:01:22 UTC (rev 24693)
@@ -23,7 +23,6 @@
 UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
 
 [transport]
-#DEBUG = YES
 PORT = 12091
 PLUGINS = http_client
 #BINARY = .libs/gnunet-service-transport
@@ -33,7 +32,6 @@
 
 
 [ats]
-#DEBUG = YES
 WAN_QUOTA_IN = unlimited
 WAN_QUOTA_OUT = unlimited
 PORT = 12006

Modified: gnunet/src/transport/test_transport_api_https_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_https_peer1.conf    2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_https_peer1.conf    2012-11-04 
21:01:22 UTC (rev 24693)
@@ -26,6 +26,5 @@
 PORT = 12101
 PLUGINS = https_client
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-DEBUG = NO
 
 

Modified: gnunet/src/transport/test_transport_api_https_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_https_peer2.conf    2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_https_peer2.conf    2012-11-04 
21:01:22 UTC (rev 24693)
@@ -29,6 +29,5 @@
 PORT = 12111
 PLUGINS = https_server
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
-DEBUG = NO
 
 

Modified: gnunet/src/transport/test_transport_api_reliability_http_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_reliability_http_peer1.conf 
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_reliability_http_peer1.conf 
2012-11-04 21:01:22 UTC (rev 24693)
@@ -30,5 +30,4 @@
 PORT = 12181
 PLUGINS = http_client
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-#DEBUG = YES
 

Modified: gnunet/src/transport/test_transport_api_reliability_http_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_reliability_http_peer2.conf 
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_reliability_http_peer2.conf 
2012-11-04 21:01:22 UTC (rev 24693)
@@ -27,5 +27,4 @@
 PORT = 12191
 PLUGINS = http_server
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
-#DEBUG = YES
 

Modified: gnunet/src/transport/test_transport_api_reliability_tcp_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_reliability_tcp_peer2.conf  
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_reliability_tcp_peer2.conf  
2012-11-04 21:01:22 UTC (rev 24693)
@@ -27,4 +27,3 @@
 PORT = 12010
 PLUGINS = tcp
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
-#DEBUG = YES

Modified: gnunet/src/transport/test_transport_api_tcp_nat_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_tcp_nat_peer1.conf  2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_tcp_nat_peer1.conf  2012-11-04 
21:01:22 UTC (rev 24693)
@@ -32,5 +32,4 @@
 PORT = 29542
 PLUGINS = tcp
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-#DEBUG = YES
 

Modified: gnunet/src/transport/test_transport_api_tcp_nat_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_tcp_nat_peer2.conf  2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_tcp_nat_peer2.conf  2012-11-04 
21:01:22 UTC (rev 24693)
@@ -31,4 +31,3 @@
 PORT = 45923
 PLUGINS = tcp
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
-#DEBUG = YES

Modified: gnunet/src/transport/test_transport_api_tcp_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_tcp_peer1.conf      2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_tcp_peer1.conf      2012-11-04 
21:01:22 UTC (rev 24693)
@@ -27,5 +27,4 @@
 PORT = 12001
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
 PLUGINS = tcp
-#DEBUG = YES
 

Modified: gnunet/src/transport/test_transport_api_timeout_http_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_http_peer1.conf     
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_timeout_http_peer1.conf     
2012-11-04 21:01:22 UTC (rev 24693)
@@ -24,7 +24,6 @@
 UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
 
 [transport]
-#DEBUG = YES
 PORT = 12081
 PLUGINS = http_client
 #BINARY = .libs/gnunet-service-transport

Modified: gnunet/src/transport/test_transport_api_timeout_http_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_http_peer2.conf     
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_timeout_http_peer2.conf     
2012-11-04 21:01:22 UTC (rev 24693)
@@ -28,7 +28,6 @@
 UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
 
 [transport]
-#DEBUG = YES
 PORT = 12091
 PLUGINS = http_server
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock

Modified: gnunet/src/transport/test_transport_api_timeout_https_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_https_peer1.conf    
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_timeout_https_peer1.conf    
2012-11-04 21:01:22 UTC (rev 24693)
@@ -23,6 +23,5 @@
 PORT = 12101
 PLUGINS = https_client
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-DEBUG = NO
 
 

Modified: gnunet/src/transport/test_transport_api_timeout_https_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_https_peer2.conf    
2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_timeout_https_peer2.conf    
2012-11-04 21:01:22 UTC (rev 24693)
@@ -27,6 +27,5 @@
 PORT = 12111
 PLUGINS = https_server
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
-DEBUG = NO
 
 

Modified: gnunet/src/transport/test_transport_api_udp_nat_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_udp_nat_peer1.conf  2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_udp_nat_peer1.conf  2012-11-04 
21:01:22 UTC (rev 24693)
@@ -31,6 +31,5 @@
 PORT = 12061
 PLUGINS = udp
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
-DEBUG = NO
 
 

Modified: gnunet/src/transport/test_transport_api_udp_nat_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_udp_nat_peer2.conf  2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_udp_nat_peer2.conf  2012-11-04 
21:01:22 UTC (rev 24693)
@@ -29,6 +29,5 @@
 PORT = 12071
 PLUGINS = udp
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
-DEBUG = NO
 
 

Modified: gnunet/src/transport/test_transport_api_wlan_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_wlan_peer1.conf     2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_wlan_peer1.conf     2012-11-04 
21:01:22 UTC (rev 24693)
@@ -7,7 +7,6 @@
 TESTMODE = 1
 
 [arm]
-DEBUG = YES
 PORT = 12164
 UNIXPATH = /tmp/gnunet-p1-service-arm.sock
 
@@ -26,7 +25,6 @@
 [transport]
 PORT = 12160
 PLUGINS = wlan
-#DEBUG = YES
 UNIXPATH = /tmp/gnunet-p1-service-transport.sock
 #PREFIX = xterm -T transport2 -e gdb --command=cmd --args
 #PREFIX = valgrind --leak-check=full --show-reachable=yes 
--main-stacksize=104857600

Modified: gnunet/src/transport/test_transport_api_wlan_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_wlan_peer2.conf     2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/transport/test_transport_api_wlan_peer2.conf     2012-11-04 
21:01:22 UTC (rev 24693)
@@ -8,7 +8,6 @@
 
 [arm]
 PORT = 12174
-DEBUG = YES
 UNIXPATH = /tmp/gnunet-p2-service-arm.sock
 
 [statistics]
@@ -26,7 +25,6 @@
 [transport]
 PORT = 12170
 PLUGINS = wlan
-#DEBUG = YES
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
 #PREFIX = xterm -T transport2 -e gdb --command=cmd --args
 #PREFIX = valgrind --leak-check=full --show-reachable=yes 
--main-stacksize=104857600

Modified: gnunet/src/transport/transport-testing.c
===================================================================
--- gnunet/src/transport/transport-testing.c    2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/transport/transport-testing.c    2012-11-04 21:01:22 UTC (rev 
24693)
@@ -71,19 +71,15 @@
                 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
 {
   struct PeerContext *p = cls;
+  char *p2_s;
+  struct PeerContext *p2;
 
-  /* Find PeerContext */
-  GNUNET_assert (p != 0);
-  GNUNET_assert (p->tth != NULL);
-  struct PeerContext *p2 = find_peer_context (p->tth, peer);
-
-  if (p == NULL)
-    return;
+  GNUNET_assert (NULL != p);
+  GNUNET_assert (NULL != p->tth);
+  p2 = find_peer_context (p->tth, peer);
   if (p->nc != NULL)
     p->nc (p->cb_cls, peer, ats, ats_count);
 
-  char *p2_s;
-
   if (p2 != NULL)
     GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id));
   else
@@ -788,5 +784,4 @@
 }
 
 
-
 /* end of transport-testing.c */

Modified: gnunet/src/util/gnunet-config.c
===================================================================
--- gnunet/src/util/gnunet-config.c     2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/gnunet-config.c     2012-11-04 21:01:22 UTC (rev 24693)
@@ -170,14 +170,15 @@
       1, &GNUNET_GETOPT_set_string, &value },
     GNUNET_GETOPT_OPTION_END
   };
-
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-config [OPTIONS]",
-                              gettext_noop ("Manipulate GNUnet configuration 
files"),
-                              options, &run, NULL)) ? 0 : ret;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-config [OPTIONS]",
+                            gettext_noop ("Manipulate GNUnet configuration 
files"),
+                            options, &run, NULL)) ? 0 : ret;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-config.c */

Modified: gnunet/src/util/gnunet-ecc.c
===================================================================
--- gnunet/src/util/gnunet-ecc.c        2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/gnunet-ecc.c        2012-11-04 21:01:22 UTC (rev 24693)
@@ -233,14 +233,17 @@
       0, &GNUNET_GETOPT_set_one, &weak_random },
     GNUNET_GETOPT_OPTION_END
   };
+  int ret;
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-ecc [OPTIONS] keyfile",
-                              gettext_noop ("Manipulate GNUnet private ECC key 
files"),
-                              options, &run, NULL)) ? 0 : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-ecc [OPTIONS] keyfile",
+                            gettext_noop ("Manipulate GNUnet private ECC key 
files"),
+                            options, &run, NULL)) ? 0 : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-ecc.c */

Modified: gnunet/src/util/gnunet-resolver.c
===================================================================
--- gnunet/src/util/gnunet-resolver.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/gnunet-resolver.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -149,14 +149,17 @@
       0, &GNUNET_GETOPT_set_one, &reverse },
     GNUNET_GETOPT_OPTION_END
   };
+  int ret;
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]",
-                              gettext_noop ("Use build-in GNUnet stub 
resolver"),
-                              options, &run, NULL)) ? 0 : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]",
+                            gettext_noop ("Use build-in GNUnet stub resolver"),
+                            options, &run, NULL)) ? 0 : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-resolver.c */

Modified: gnunet/src/util/gnunet-rsa.c
===================================================================
--- gnunet/src/util/gnunet-rsa.c        2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/gnunet-rsa.c        2012-11-04 21:01:22 UTC (rev 24693)
@@ -222,7 +222,7 @@
  * @return 0 ok, 1 on error
  */
 int
-main (int argc, char *const *argv)
+main (int argc, char *const*argv)
 {
   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
     { 'g', "generate-keys", "COUNT",
@@ -242,14 +242,17 @@
       0, &GNUNET_GETOPT_set_one, &weak_random },
     GNUNET_GETOPT_OPTION_END
   };
+  int ret;
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-rsa [OPTIONS] keyfile",
-                              gettext_noop ("Manipulate GNUnet private RSA key 
files"),
-                              options, &run, NULL)) ? 0 : 1;
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-rsa [OPTIONS] keyfile",
+                            gettext_noop ("Manipulate GNUnet private RSA key 
files"),
+                            options, &run, NULL)) ? 0 : 1;
+  GNUNET_free ((void*) argv);
+  return ret;
 }
 
 /* end of gnunet-rsa.c */

Modified: gnunet/src/util/gnunet-uri.c
===================================================================
--- gnunet/src/util/gnunet-uri.c        2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/gnunet-uri.c        2012-11-04 21:01:22 UTC (rev 24693)
@@ -162,6 +162,7 @@
     GNUNET_GETOPT_OPTION_END
   };
   struct GNUNET_SIGNAL_Context *shc_chld;
+  int ret;
 
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
@@ -169,16 +170,15 @@
   GNUNET_assert (sigpipe != NULL);
   shc_chld =
     GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death);
-  if (GNUNET_OK !=
-      GNUNET_PROGRAM_run (argc, argv, "gnunet-uri URI",
-                         gettext_noop ("Perform default-actions for GNUnet 
URIs"),
-                         options, &run, NULL)) 
-    return 1;
+  ret = GNUNET_PROGRAM_run (argc, argv, "gnunet-uri URI",
+                           gettext_noop ("Perform default-actions for GNUnet 
URIs"),
+                           options, &run, NULL);
   GNUNET_SIGNAL_handler_uninstall (shc_chld);
   shc_chld = NULL;
   GNUNET_DISK_pipe_close (sigpipe);
   sigpipe = NULL; 
-  return ret;
+  GNUNET_free ((void *) argv);
+  return (GNUNET_OK == ret) ? 0 : 1;
 }
 
 /* end of gnunet-uri.c */

Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c   2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/os_installation.c   2012-11-04 21:01:22 UTC (rev 24693)
@@ -65,7 +65,7 @@
   while (NULL != fgets (line, sizeof (line), f))
   {
     if ((1 ==
-         SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) 
&&
+         SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%1023s", 
dir)) &&
         (NULL != (lgu = strstr (dir, "libgnunetutil"))))
     {
       lgu[0] = '\0';

Modified: gnunet/src/util/test_common_logging_runtime_loglevels.c
===================================================================
--- gnunet/src/util/test_common_logging_runtime_loglevels.c     2012-11-04 
18:35:07 UTC (rev 24692)
+++ gnunet/src/util/test_common_logging_runtime_loglevels.c     2012-11-04 
21:01:22 UTC (rev 24693)
@@ -42,6 +42,8 @@
 
 static GNUNET_SCHEDULER_TaskIdentifier die_task;
 
+static GNUNET_SCHEDULER_TaskIdentifier read_task;
+
 static void
 runone (void);
 
@@ -60,6 +62,11 @@
     GNUNET_OS_process_destroy (proc);
     proc = NULL;
   }
+  if (GNUNET_SCHEDULER_NO_TASK != read_task)
+  {
+    GNUNET_SCHEDULER_cancel (read_task);
+    read_task = GNUNET_SCHEDULER_NO_TASK;
+  }
   GNUNET_DISK_pipe_close (pipe_stdout);
   if (ok == 1)
   {
@@ -167,6 +174,7 @@
   long delays[8];
   int rd;
 
+  read_task = GNUNET_SCHEDULER_NO_TASK;
   rd = GNUNET_DISK_file_read (stdout_read_handle, buf_ptr,
                               sizeof (buf) - bytes);
   if (rd > 0)
@@ -176,9 +184,9 @@
 #if VERBOSE
     FPRINTF (stderr, "got %d bytes, reading more\n", rd);
 #endif
-    GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
-                                    stdout_read_handle, &read_call,
-                                    (void *) stdout_read_handle);
+    read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
+                                               stdout_read_handle, &read_call,
+                                               stdout_read_handle);
     return;
   }
 
@@ -343,9 +351,9 @@
   buf_ptr = buf;
   memset (&buf, 0, sizeof (buf));
 
-  GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
-                                  stdout_read_handle, &read_call,
-                                  (void *) stdout_read_handle);
+  read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
+                                             stdout_read_handle, &read_call,
+                                             stdout_read_handle);
 }
 
 static void

Modified: gnunet/src/util/test_os_start_process.c
===================================================================
--- gnunet/src/util/test_os_start_process.c     2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/util/test_os_start_process.c     2012-11-04 21:01:22 UTC (rev 
24693)
@@ -204,6 +204,7 @@
     GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, 
hello_pipe_stdin, hello_pipe_stdout, fn,
                             "gnunet-service-resolver", "-", NULL); 
   sleep (1); /* give process time to start, so we actually use the pipe-kill 
mechanism! */
+  GNUNET_free (fn);
   if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc));
@@ -241,6 +242,7 @@
   {
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   }
+  GNUNET_free (fn);
   GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc));
   GNUNET_OS_process_destroy (proc);
   proc = NULL;

Modified: gnunet/src/util/test_plugin.c
===================================================================
--- gnunet/src/util/test_plugin.c       2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/util/test_plugin.c       2012-11-04 21:01:22 UTC (rev 24693)
@@ -35,6 +35,7 @@
   ret = GNUNET_PLUGIN_unload (libname, "out");
   GNUNET_assert (NULL != ret);
   GNUNET_assert (0 == strcmp (ret, "World"));
+  GNUNET_free (ret);
 }
 
 

Modified: gnunet/src/util/test_resolver_api_data.conf
===================================================================
--- gnunet/src/util/test_resolver_api_data.conf 2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/util/test_resolver_api_data.conf 2012-11-04 21:01:22 UTC (rev 
24693)
@@ -4,5 +4,4 @@
 [resolver]
 PORT = 22354
 HOSTNAME = localhost
-DEBUG = YES
 

Modified: gnunet/src/util/test_server_mst_interrupt.c
===================================================================
--- gnunet/src/util/test_server_mst_interrupt.c 2012-11-04 18:35:07 UTC (rev 
24692)
+++ gnunet/src/util/test_server_mst_interrupt.c 2012-11-04 21:01:22 UTC (rev 
24693)
@@ -30,8 +30,8 @@
 #include "gnunet_time_lib.h"
 
 static struct GNUNET_SERVER_MessageStreamTokenizer * mst;
-static int ret;
 
+
 /* Callback destroying mst with data in buffer */
 static int
 mst_cb (void *cls, void *client,
@@ -42,40 +42,23 @@
   return GNUNET_SYSERR;
 }
 
-/**
- * Main method
- */
-static int
-check ()
+
+int
+main (int argc, char *argv[])
 {
-
   struct GNUNET_PeerIdentity id;
   struct GNUNET_MessageHeader msg[2];
 
-  /* Prepare */
-  memset (&id, sizeof (id), '\0');
+  GNUNET_log_setup ("test_server_mst_interrupt", "WARNING", NULL);
+  memset (&id, 0, sizeof (id));
   msg[0].size = htons (sizeof (msg));
   msg[0].type = htons (sizeof (GNUNET_MESSAGE_TYPE_DUMMY));
-
   mst = GNUNET_SERVER_mst_create(mst_cb, NULL);
-
-  GNUNET_SERVER_mst_receive(mst, &id,  (const char *) &msg, 2 * sizeof (msg), 
GNUNET_NO, GNUNET_NO);
-
+  GNUNET_SERVER_mst_receive (mst, &id,  
+                            (const char *) &msg, 2 * sizeof (msg), 
+                            GNUNET_NO, GNUNET_NO);
   /* If we reach this line, it did not crash */
-  ret = 0;
-
-  return ret;
+  return 0;
 }
 
-int
-main (int argc, char *argv[])
-{
-  ret = 1;
-
-  GNUNET_log_setup ("test_server", "WARNING", NULL);
-  check ();
-
-  return ret;
-}
-
 /* end of test_server_mst_interrupt.c */

Modified: gnunet/src/vpn/gnunet-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-vpn.c 2012-11-04 18:35:07 UTC (rev 24692)
+++ gnunet/src/vpn/gnunet-vpn.c 2012-11-04 21:01:22 UTC (rev 24693)
@@ -323,15 +323,16 @@
     GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
     GNUNET_GETOPT_OPTION_END
   };
-
   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
     return 2;
 
-  return (GNUNET_OK ==
-          GNUNET_PROGRAM_run (argc, argv, "gnunet-vpn",
-                              gettext_noop
-                              ("Setup tunnels via VPN."), options,
+  ret = (GNUNET_OK ==
+        GNUNET_PROGRAM_run (argc, argv, "gnunet-vpn",
+                            gettext_noop
+                            ("Setup tunnels via VPN."), options,
                               &run, NULL)) ? ret : 1;
+  GNUNET_free ((void *) argv);
+  return ret;
 }
 
 




reply via email to

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