diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-03-15 12:11:56 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-03-15 12:11:56 +0000 |
commit | 58ab981fbdfe55b3543bad618fee83873a744549 (patch) | |
tree | 918b83d397457a95112a46dd904cf17114fe665d /src/regex | |
parent | bbe5202e0723144b7d615d51ed909aafb2aa6175 (diff) | |
download | gnunet-58ab981fbdfe55b3543bad618fee83873a744549.tar.gz gnunet-58ab981fbdfe55b3543bad618fee83873a744549.zip |
- avoid direct printf when possible
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/gnunet-regex-profiler.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index 91281e439..626198de0 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -908,9 +908,11 @@ do_connect_by_string_timeout (void *cls, | |||
908 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 908 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
909 | "Found %i of %i strings\n", peers_found, num_search_strings); | 909 | "Found %i of %i strings\n", peers_found, num_search_strings); |
910 | 910 | ||
911 | printf ("Search timed out after %s. Collecting stats and shutting down.\n", | 911 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
912 | GNUNET_STRINGS_relative_time_to_string (search_timeout, GNUNET_NO)); | 912 | "Search timed out after %s." |
913 | fflush (stdout); | 913 | "Collecting stats and shutting down.\n", |
914 | GNUNET_STRINGS_relative_time_to_string (search_timeout, | ||
915 | GNUNET_NO)); | ||
914 | 916 | ||
915 | GNUNET_SCHEDULER_add_now (&do_collect_stats, NULL); | 917 | GNUNET_SCHEDULER_add_now (&do_collect_stats, NULL); |
916 | } | 918 | } |
@@ -930,8 +932,7 @@ do_connect_by_string (void *cls, | |||
930 | { | 932 | { |
931 | unsigned int i; | 933 | unsigned int i; |
932 | 934 | ||
933 | printf ("Starting string search.\n"); | 935 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Starting string search.\n"); |
934 | fflush (stdout); | ||
935 | 936 | ||
936 | search_timeout_task = GNUNET_SCHEDULER_add_delayed (search_timeout, | 937 | search_timeout_task = GNUNET_SCHEDULER_add_delayed (search_timeout, |
937 | &do_connect_by_string_timeout, NULL); | 938 | &do_connect_by_string_timeout, NULL); |
@@ -1169,8 +1170,7 @@ arm_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
1169 | static void | 1170 | static void |
1170 | do_announce (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 1171 | do_announce (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
1171 | { | 1172 | { |
1172 | printf ("Starting announce.\n"); | 1173 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Starting announce.\n"); |
1173 | fflush (stdout); | ||
1174 | 1174 | ||
1175 | /* First connect to arm service, then announce. Next | 1175 | /* First connect to arm service, then announce. Next |
1176 | announce will be in arm_connect_cb */ | 1176 | announce will be in arm_connect_cb */ |
@@ -1615,6 +1615,7 @@ controller_event_cb (void *cls, | |||
1615 | printf ("F%u/%u(%s)", | 1615 | printf ("F%u/%u(%s)", |
1616 | retry_links + 1, established_links + 1, | 1616 | retry_links + 1, established_links + 1, |
1617 | event->details.operation_finished.emsg); | 1617 | event->details.operation_finished.emsg); |
1618 | fflush (stdout); | ||
1618 | retry_links++; | 1619 | retry_links++; |
1619 | } | 1620 | } |
1620 | /* We do no retries, consider this link as established */ | 1621 | /* We do no retries, consider this link as established */ |