[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22140 - in gnunet/src: nse transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22140 - in gnunet/src: nse transport |
Date: |
Wed, 20 Jun 2012 12:55:25 +0200 |
Author: grothoff
Date: 2012-06-20 12:55:25 +0200 (Wed, 20 Jun 2012)
New Revision: 22140
Modified:
gnunet/src/nse/gnunet-nse-profiler.c
gnunet/src/transport/gnunet-transport-certificate-creation.c
gnunet/src/transport/gnunet-transport-wlan-sender.c
Log:
-check misc return values
Modified: gnunet/src/nse/gnunet-nse-profiler.c
===================================================================
--- gnunet/src/nse/gnunet-nse-profiler.c 2012-06-20 10:53:52 UTC (rev
22139)
+++ gnunet/src/nse/gnunet-nse-profiler.c 2012-06-20 10:55:25 UTC (rev
22140)
@@ -182,17 +182,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
ok = 0;
}
}
@@ -203,10 +199,7 @@
{
struct NSEPeer *pos;
-#if VERBOSE
- FPRINTF (stderr, "%s", "Ending test.\n");
-#endif
-
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n");
if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (disconnect_task);
@@ -366,19 +359,15 @@
struct NSEPeer *current_peer;
unsigned int i;
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting to nse service of peers\n");
-#endif
for (i = 0; i < num_peers; i++)
{
if ((connection_limit > 0) &&
(num_peers > connection_limit) &&
(i % (num_peers / connection_limit) != 0))
continue;
-#if VERBOSE
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"nse-profiler: connecting to nse service of peer %d\n", i);
-#endif
current_peer = GNUNET_malloc (sizeof (struct NSEPeer));
current_peer->daemon = GNUNET_TESTING_daemon_get (pg, i);
if (GNUNET_YES ==
@@ -747,10 +736,8 @@
GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
return;
}
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peer Group started successfully, connecting to NSE service for
each peer!\n");
-#endif
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n",
total_connections);
if (data_file != NULL)
@@ -806,8 +793,8 @@
ok = 1;
//testing_cfg = GNUNET_CONFIGURATION_create ();
testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n");
+#if VERBOSE
GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing",
"use_progressbars", "YES");
#endif
@@ -920,16 +907,14 @@
return 2;
GNUNET_log_setup ("nse-profiler",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
- GNUNET_PROGRAM_run (argc, argv, "nse-profiler",
- gettext_noop
- ("Measure quality and performance of the NSE service."),
- options, &run, NULL);
+ if (GNUNET_OK !=
+ GNUNET_PROGRAM_run (argc, argv, "nse-profiler",
+ gettext_noop
+ ("Measure quality and performance of the NSE
service."),
+ options, &run, NULL))
+ ok = 1;
#if REMOVE_DIR
GNUNET_DISK_directory_remove ("/tmp/nse-profiler");
#endif
Modified: gnunet/src/transport/gnunet-transport-certificate-creation.c
===================================================================
--- gnunet/src/transport/gnunet-transport-certificate-creation.c
2012-06-20 10:53:52 UTC (rev 22139)
+++ gnunet/src/transport/gnunet-transport-certificate-creation.c
2012-06-20 10:55:25 UTC (rev 22140)
@@ -53,7 +53,7 @@
if (argc != 3)
return 1;
removecerts (argv[1], argv[2]);
- close (2); /* eliminate stderr */
+ (void) close (2); /* eliminate stderr */
/* Create RSA Private Key */
/* openssl genrsa -out $1 1024 2> /dev/null */
openssl =
Modified: gnunet/src/transport/gnunet-transport-wlan-sender.c
===================================================================
--- gnunet/src/transport/gnunet-transport-wlan-sender.c 2012-06-20 10:53:52 UTC
(rev 22139)
+++ gnunet/src/transport/gnunet-transport-wlan-sender.c 2012-06-20 10:55:25 UTC
(rev 22140)
@@ -163,7 +163,10 @@
if (pid)
{
/* A positive (non-negative) PID indicates the parent process */
- close (commpipe[0]); /* Close unused side of pipe (in side) */
+ if (0 != close (commpipe[0])) /* Close unused side of pipe (in
side) */
+ fprintf (stderr,
+ "Failed to close fd: %s\n",
+ strerror (errno));
setvbuf (stdout, (char *) NULL, _IONBF, 0); /* Set non-buffered output on
stdout */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22140 - in gnunet/src: nse transport,
gnunet <=