View Issue Details

IDProjectCategoryView StatusLast Update
0003594GNUnetATS servicepublic2018-06-07 00:24
ReporterChristian Grothoff Assigned ToChristian Grothoff  
PrioritynormalSeveritytrivialReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003594: gnunet-ats prints primary output to stderr
DescriptionRunning

$ gnunet-ats -na | grep foo

doesn't work because gnunet-ats decides to write its main output to stderr instead of to stdout where it belongs. Booh!
TagsNo tags attached.
Attached Files
gnunet-ats.c_stdout.patch (1,482 bytes)   
Index: gnunet-ats.c
===================================================================
--- gnunet-ats.c	(revision 35823)
+++ gnunet-ats.c	(working copy)
@@ -285,11 +285,11 @@
   addresses = NULL;
 
   if (0 < pending)
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("%u address resolutions had a timeout\n"),
              pending);
   if (opt_list_used || opt_list_all)
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("ATS returned stat_results for %u addresses\n"),
              stat_results);
   ret = 0;
@@ -362,7 +362,7 @@
     return;
   }
 
-  FPRINTF (stderr,
+  FPRINTF (stdout,
            _("Peer `%s' plugin `%s', address `%s', `%s' bw out: %u Bytes/s, bw in %u Bytes/s, %s\n"),
            GNUNET_i2s (&pr->address->peer),
            pr->address->transport_name,
@@ -479,7 +479,7 @@
                  GNUNET_CONTAINER_multipeermap_remove (addresses,
                                                        &address->peer,
                                                        actx.res));
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("Removed address of peer `%s' with plugin `%s'\n"),
              GNUNET_i2s (&address->peer),
              actx.res->address->transport_name);
@@ -672,7 +672,7 @@
     }
     GNUNET_free(entry_in);
 
-    FPRINTF (stderr,
+    FPRINTF (stdout,
              _("Quota for network `%11s' (in/out): %10s / %10s\n"),
              GNUNET_ATS_print_network_type (c),
              quota_in_str,
gnunet-ats.c_stdout.patch (1,482 bytes)   

Activities

jah

2015-05-27 01:23

reporter   ~0009152

I took a crack at this introductory task: gnunet-ats.c_stdout.patch.

The following messages will still go to stderr:-

Failed to convert address for peer `%s' plugin `%s' length %u to string (communication error)
Failed to convert address for peer `%s' plugin `%s' length %u to string (address invalid or not supported)
Outbound quota for network `%11s' not configured!
Inbound quota for network `%11s' not configured!
Service `%s' is not running
Failed to parse peer identity `%s'
Please select one operation : %s or %s or %s or %s or %s
Cannot connect to ATS service, exiting...
Cannot issue request to ATS service, exiting...
Cannot connect to ATS service, exiting...
Cannot issue request to ATS service, exiting...
Cannot connect to ATS service, exiting...
No preference type given!
No peer given!
Valid type required
Cannot connect to ATS service, exiting...

Christian Grothoff

2015-05-28 12:49

manager   ~0009153

Committed fix from jah (by accident as part of SVN 35829 where I was fixing an unrelated build error that I discovered when trying the patch...).

Thanks!

Issue History

Date Modified Username Field Change
2014-12-24 01:06 Christian Grothoff New Issue
2014-12-24 01:06 Christian Grothoff Status new => assigned
2014-12-24 01:06 Christian Grothoff Assigned To => Matthias Wachs
2015-02-11 20:02 Christian Grothoff Assigned To Matthias Wachs =>
2015-02-11 20:02 Christian Grothoff Status assigned => confirmed
2015-03-21 00:38 Christian Grothoff Target Version => 0.11.0
2015-05-27 01:15 jah File Added: gnunet-ats.c_stdout.patch
2015-05-27 01:23 jah Note Added: 0009152
2015-05-28 12:49 Christian Grothoff Note Added: 0009153
2015-05-28 12:49 Christian Grothoff Status confirmed => resolved
2015-05-28 12:49 Christian Grothoff Fixed in Version => 0.11.0pre66
2015-05-28 12:49 Christian Grothoff Resolution open => fixed
2015-05-28 12:49 Christian Grothoff Assigned To => Christian Grothoff
2015-05-28 12:49 Christian Grothoff Target Version 0.11.0 => 0.11.0pre66
2018-06-07 00:24 Christian Grothoff Status resolved => closed