View Issue Details

IDProjectCategoryView StatusLast Update
0003594GNUnetobsoletepublic2024-05-03 11:48
ReporterChristian Grothoff Assigned ToChristian Grothoff Due Date
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-26 23: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 10: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 ModifiedUsernameFieldChange
2014-12-24 00:06Christian GrothoffNew Issue
2014-12-24 00:06Christian GrothoffStatusnew => assigned
2014-12-24 00:06Christian GrothoffAssigned To => Matthias Wachs
2015-02-11 19:02Christian GrothoffAssigned ToMatthias Wachs =>
2015-02-11 19:02Christian GrothoffStatusassigned => confirmed
2015-03-20 23:38Christian GrothoffTarget Version => 0.11.0
2015-05-26 23:15jahFile Added: gnunet-ats.c_stdout.patch
2015-05-26 23:23jahNote Added: 0009152
2015-05-28 10:49Christian GrothoffNote Added: 0009153
2015-05-28 10:49Christian GrothoffStatusconfirmed => resolved
2015-05-28 10:49Christian GrothoffFixed in Version => 0.11.0pre66
2015-05-28 10:49Christian GrothoffResolutionopen => fixed
2015-05-28 10:49Christian GrothoffAssigned To => Christian Grothoff
2015-05-28 10:49Christian GrothoffTarget Version0.11.0 => 0.11.0pre66
2018-06-06 22:24Christian GrothoffStatusresolved => closed
2024-05-03 11:48Christian GrothoffCategoryATS service => obsolete