From 739130474d3d636d39bcfc16ebceb606ff37bd2c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 May 2011 00:19:22 +0000 Subject: [PATCH] use fprintf for intended test outputs --- src/transport/test_transport_ats.c | 59 +++++++++++++++++++----------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/src/transport/test_transport_ats.c b/src/transport/test_transport_ats.c index 55bc7e780..fdf3eff72 100644 --- a/src/transport/test_transport_ats.c +++ b/src/transport/test_transport_ats.c @@ -222,8 +222,10 @@ static void evaluate_measurements() } stddev[0] /= c_new; stddev[0] = sqrt (stddev[0]); - if (!machine_parsable) GNUNET_log (GNUNET_ERROR_TYPE_ERROR,"new, %i measurements, average: %f stddev: %f\n", - c_new, average[0], stddev[0]); + if (!machine_parsable) + fprintf (stderr, + "new, %i measurements, average: %f stddev: %f\n", + c_new, average[0], stddev[0]); average[1] = 0.0; for (c=0; c= MEASUREMENTS) && (c_new >= MEASUREMENTS) && (c_unmodified >= MEASUREMENTS)) { #if !VERBOSE @@ -410,25 +419,29 @@ int stats_cb (void *cls, if (0 == strcmp (name,"ATS solution")) { current.solution = value; - if (printed == GNUNET_NO) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); + if (printed == GNUNET_NO) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); } if (0 == strcmp (name,"ATS peers")) { current.peers = value; - if (printed == GNUNET_NO) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); + if (printed == GNUNET_NO) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); } if (0 == strcmp (name,"ATS mechanisms")) { current.mechs = value; - if (printed == GNUNET_NO) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); + if (printed == GNUNET_NO) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); } if (0 == strcmp (name,"ATS duration")) { current.duration = value; - if (printed == GNUNET_NO) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); + if (printed == GNUNET_NO) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] %s: %llu \n", count, name, value); } if (0 == strcmp (name,"ATS state")) { @@ -444,7 +457,8 @@ int stats_cb (void *cls, cont = "QC_UPDATED"; if (value == ATS_UNMODIFIED) cont = "UNMODIFIED"; - if (printed == GNUNET_NO) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS state: %s\n", count, cont); + if (printed == GNUNET_NO) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS state: %s\n", count, cont); } } return GNUNET_OK; @@ -543,7 +557,8 @@ void daemon_connect_cb(void *cls, char * firstc = strdup(GNUNET_i2s(first)); char * secondc = strdup(GNUNET_i2s(second)); connected++; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected peers `%s'<->`%s' (%i/%i)\n", firstc, secondc, connected, peers-1); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Connected peers `%s'<->`%s' (%i/%i)\n", firstc, secondc, connected, peers-1); GNUNET_free(firstc); GNUNET_free(secondc); -- 2.25.1