From: Christian Grothoff Date: Wed, 25 May 2011 00:19:22 +0000 (+0000) Subject: use fprintf for intended test outputs X-Git-Tag: initial-import-from-subversion-38251~18432 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=739130474d3d636d39bcfc16ebceb606ff37bd2c;p=oweals%2Fgnunet.git use fprintf for intended test outputs --- 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);