diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:42:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:42:04 +0000 |
commit | 416c2f5a713b93ba689a8cd1e038682a53e6bc17 (patch) | |
tree | 987f51d9edfddc02afe1524df5e1156b920c71d4 /src/core | |
parent | fceec98e767bce7ad2c24dde73cdcf8837e04013 (diff) | |
download | gnunet-416c2f5a713b93ba689a8cd1e038682a53e6bc17.tar.gz gnunet-416c2f5a713b93ba689a8cd1e038682a53e6bc17.zip |
-LRN: use FPRINTF -- #2051
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gnunet-core-list-connections.c | 8 | ||||
-rw-r--r-- | src/core/test_core_api.c | 2 | ||||
-rw-r--r-- | src/core/test_core_api_reliability.c | 4 | ||||
-rw-r--r-- | src/core/test_core_api_start_only.c | 4 | ||||
-rw-r--r-- | src/core/test_core_quota_compliance.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/src/core/gnunet-core-list-connections.c b/src/core/gnunet-core-list-connections.c index c93f50981..fcd076564 100644 --- a/src/core/gnunet-core-list-connections.c +++ b/src/core/gnunet-core-list-connections.c | |||
@@ -115,7 +115,7 @@ process_resolved_address (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
115 | /* | 115 | /* |
116 | * new_address = GNUNET_malloc (sizeof (struct AddressStringList)); | 116 | * new_address = GNUNET_malloc (sizeof (struct AddressStringList)); |
117 | * #if VERBOSE | 117 | * #if VERBOSE |
118 | * fprintf (stderr, "Received address %s\n", address); | 118 | * FPRINTF (stderr, "Received address %s\n", address); |
119 | * #endif | 119 | * #endif |
120 | * | 120 | * |
121 | * new_address->address_string = GNUNET_strdup ("FIXME"); | 121 | * new_address->address_string = GNUNET_strdup ("FIXME"); |
@@ -138,7 +138,7 @@ connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
138 | if (peer != NULL) /* Not yet finished */ | 138 | if (peer != NULL) /* Not yet finished */ |
139 | { | 139 | { |
140 | #if VERBOSE | 140 | #if VERBOSE |
141 | fprintf (stderr, "Learned about peer %s\n", GNUNET_i2s (peer)); | 141 | FPRINTF (stderr, "Learned about peer %s\n", GNUNET_i2s (peer)); |
142 | peer_count++; | 142 | peer_count++; |
143 | #endif | 143 | #endif |
144 | pc = GNUNET_malloc (sizeof (struct PrintContext)); | 144 | pc = GNUNET_malloc (sizeof (struct PrintContext)); |
@@ -150,7 +150,7 @@ connected_peer_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
150 | #if VERBOSE | 150 | #if VERBOSE |
151 | else | 151 | else |
152 | { | 152 | { |
153 | fprintf (stderr, "Counted %u total connected peers.\n", peer_count); | 153 | FPRINTF (stderr, "Counted %u total connected peers.\n", peer_count); |
154 | } | 154 | } |
155 | #endif | 155 | #endif |
156 | } | 156 | } |
@@ -172,7 +172,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
172 | cfg = c; | 172 | cfg = c; |
173 | if (args[0] != NULL) | 173 | if (args[0] != NULL) |
174 | { | 174 | { |
175 | fprintf (stderr, _("Invalid command line argument `%s'\n"), args[0]); | 175 | FPRINTF (stderr, _("Invalid command line argument `%s'\n"), args[0]); |
176 | return; | 176 | return; |
177 | } | 177 | } |
178 | 178 | ||
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index e63fc9f9d..df29d52a1 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -112,7 +112,7 @@ static void | |||
112 | terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 112 | terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
113 | { | 113 | { |
114 | #if VERBOSE | 114 | #if VERBOSE |
115 | fprintf (stderr, "ENDING ANGRILY %u\n", ok); | 115 | FPRINTF (stderr, "ENDING ANGRILY %u\n", ok); |
116 | #endif | 116 | #endif |
117 | GNUNET_break (0); | 117 | GNUNET_break (0); |
118 | if (NULL != p1.ch) | 118 | if (NULL != p1.ch) |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index b2079ba35..434886d42 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -134,7 +134,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
134 | GNUNET_TRANSPORT_disconnect (p2.th); | 134 | GNUNET_TRANSPORT_disconnect (p2.th); |
135 | p2.th = NULL; | 135 | p2.th = NULL; |
136 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; | 136 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; |
137 | fprintf (stderr, "\nThroughput was %llu kb/s\n", | 137 | FPRINTF (stderr, "\nThroughput was %llu kb/s\n", |
138 | total_bytes * 1000 / 1024 / delta); | 138 | total_bytes * 1000 / 1024 / delta); |
139 | GAUGER ("CORE", "Core throughput/s", total_bytes * 1000 / 1024 / delta, | 139 | GAUGER ("CORE", "Core throughput/s", total_bytes * 1000 / 1024 / delta, |
140 | "kb/s"); | 140 | "kb/s"); |
@@ -353,7 +353,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
353 | #endif | 353 | #endif |
354 | n++; | 354 | n++; |
355 | if (0 == (n % (TOTAL_MSGS / 100))) | 355 | if (0 == (n % (TOTAL_MSGS / 100))) |
356 | fprintf (stderr, "."); | 356 | FPRINTF (stderr, "%s", "."); |
357 | if (n == TOTAL_MSGS) | 357 | if (n == TOTAL_MSGS) |
358 | { | 358 | { |
359 | GNUNET_SCHEDULER_cancel (err_task); | 359 | GNUNET_SCHEDULER_cancel (err_task); |
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index b06b97899..75ba73ce3 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -58,7 +58,7 @@ static GNUNET_SCHEDULER_TaskIdentifier timeout_task_id; | |||
58 | static int ok; | 58 | static int ok; |
59 | 59 | ||
60 | #if VERBOSE | 60 | #if VERBOSE |
61 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 61 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
62 | #else | 62 | #else |
63 | #define OKPP do { ok++; } while (0) | 63 | #define OKPP do { ok++; } while (0) |
64 | #endif | 64 | #endif |
@@ -162,7 +162,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
162 | static void | 162 | static void |
163 | timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 163 | timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
164 | { | 164 | { |
165 | fprintf (stderr, "Timeout.\n"); | 165 | FPRINTF (stderr, "%s", "Timeout.\n"); |
166 | if (p1.ch != NULL) | 166 | if (p1.ch != NULL) |
167 | { | 167 | { |
168 | GNUNET_CORE_disconnect (p1.ch); | 168 | GNUNET_CORE_disconnect (p1.ch); |
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index adfa93f1f..c45863f0d 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -227,7 +227,7 @@ measurement_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
227 | enum GNUNET_ErrorType kind = GNUNET_ERROR_TYPE_DEBUG; | 227 | enum GNUNET_ErrorType kind = GNUNET_ERROR_TYPE_DEBUG; |
228 | 228 | ||
229 | measure_task = GNUNET_SCHEDULER_NO_TASK; | 229 | measure_task = GNUNET_SCHEDULER_NO_TASK; |
230 | fprintf (stdout, "\n"); | 230 | FPRINTF (stdout, "%s", "\n"); |
231 | running = GNUNET_NO; | 231 | running = GNUNET_NO; |
232 | 232 | ||
233 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; | 233 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; |
@@ -498,7 +498,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
498 | #endif | 498 | #endif |
499 | n++; | 499 | n++; |
500 | if (0 == (n % 10)) | 500 | if (0 == (n % 10)) |
501 | fprintf (stderr, "."); | 501 | FPRINTF (stderr, "%s", "."); |
502 | 502 | ||
503 | 503 | ||
504 | if (running == GNUNET_YES) | 504 | if (running == GNUNET_YES) |