X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fstatistics%2Fgnunet-statistics.c;h=bf111ade2a88b17bac1ec2edc927b9beec406865;hb=a12b8c2c4cbf952c8c305cde193bb25c13a0912b;hp=a92faa3d74af785dff10e9e907f43e7857524abf;hpb=b550d58cb1d4ad39f491dd742bfee360a1f74963;p=oweals%2Fgnunet.git diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index a92faa3d7..bf111ade2 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c @@ -14,6 +14,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . + + SPDX-License-Identifier: AGPL3.0-or-later */ /** @@ -216,25 +218,29 @@ printer (void *cls, { now_str = GNUNET_STRINGS_absolute_time_to_string (now); FPRINTF (stdout, - "%24s%s %s%s%12s%s %50s%s ", + "%24s%s %s%s%12s%s %s%50s%s%s ", now_str, csv_separator, value_set->is_persistent ? "!" : " ", csv_separator, value_set->subsystem, csv_separator, + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ _(value_set->name), + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ (0 == strlen (csv_separator) ? ":": csv_separator)); } else { FPRINTF (stdout, - "%s%s%12s%s %50s%s ", + "%s%s%12s%s %s%50s%s%s ", value_set->is_persistent ? "!" : " ", csv_separator, value_set->subsystem, csv_separator, + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ _(value_set->name), + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ (0 == strlen (csv_separator) ? ":": csv_separator)); } } @@ -279,26 +285,30 @@ printer_watch (void *cls, { now_str = GNUNET_STRINGS_absolute_time_to_string (now); FPRINTF (stdout, - "%24s%s %s%s%12s%s %50s%s %16llu\n", + "%24s%s %s%s%12s%s %s%50s%s%s %16llu\n", now_str, csv_separator, is_persistent ? "!" : " ", csv_separator, subsystem, csv_separator, + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ _(name), + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ (0 == strlen (csv_separator) ? ":": csv_separator), (unsigned long long) value); } else { FPRINTF (stdout, - "%s%s%12s%s %50s%s %16llu\n", + "%s%s%12s%s %s%50s%s%s %16llu\n", is_persistent ? "!" : " ", csv_separator, subsystem, csv_separator, + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ _(name), + (0 == strlen (csv_separator) ? "": "\""), /* quotes if csv */ (0 == strlen (csv_separator) ? ":": csv_separator), (unsigned long long) value); }