diff options
108 files changed, 537 insertions, 539 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 13b1fdc17..65700ee11 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -146,47 +146,47 @@ confirm_cb (void *cls, | |||
146 | switch (result) | 146 | switch (result) |
147 | { | 147 | { |
148 | case GNUNET_ARM_PROCESS_UNKNOWN: | 148 | case GNUNET_ARM_PROCESS_UNKNOWN: |
149 | fprintf (stderr, _("Service `%s' is unknown to ARM.\n"), service); | 149 | FPRINTF (stderr, _("Service `%s' is unknown to ARM.\n"), service); |
150 | ret = 1; | 150 | ret = 1; |
151 | break; | 151 | break; |
152 | case GNUNET_ARM_PROCESS_DOWN: | 152 | case GNUNET_ARM_PROCESS_DOWN: |
153 | if (quiet != GNUNET_YES) | 153 | if (quiet != GNUNET_YES) |
154 | fprintf (stdout, _("Service `%s' has been stopped.\n"), service); | 154 | FPRINTF (stdout, _("Service `%s' has been stopped.\n"), service); |
155 | break; | 155 | break; |
156 | case GNUNET_ARM_PROCESS_ALREADY_RUNNING: | 156 | case GNUNET_ARM_PROCESS_ALREADY_RUNNING: |
157 | fprintf (stderr, _("Service `%s' was already running.\n"), service); | 157 | FPRINTF (stderr, _("Service `%s' was already running.\n"), service); |
158 | ret = 1; | 158 | ret = 1; |
159 | break; | 159 | break; |
160 | case GNUNET_ARM_PROCESS_STARTING: | 160 | case GNUNET_ARM_PROCESS_STARTING: |
161 | if (quiet != GNUNET_YES) | 161 | if (quiet != GNUNET_YES) |
162 | fprintf (stdout, _("Service `%s' has been started.\n"), service); | 162 | FPRINTF (stdout, _("Service `%s' has been started.\n"), service); |
163 | break; | 163 | break; |
164 | case GNUNET_ARM_PROCESS_ALREADY_STOPPING: | 164 | case GNUNET_ARM_PROCESS_ALREADY_STOPPING: |
165 | fprintf (stderr, _("Service `%s' was already being stopped.\n"), service); | 165 | FPRINTF (stderr, _("Service `%s' was already being stopped.\n"), service); |
166 | ret = 1; | 166 | ret = 1; |
167 | break; | 167 | break; |
168 | case GNUNET_ARM_PROCESS_ALREADY_DOWN: | 168 | case GNUNET_ARM_PROCESS_ALREADY_DOWN: |
169 | fprintf (stderr, _("Service `%s' was already not running.\n"), service); | 169 | FPRINTF (stderr, _("Service `%s' was already not running.\n"), service); |
170 | ret = 1; | 170 | ret = 1; |
171 | break; | 171 | break; |
172 | case GNUNET_ARM_PROCESS_SHUTDOWN: | 172 | case GNUNET_ARM_PROCESS_SHUTDOWN: |
173 | fprintf (stderr, _("Request ignored as ARM is shutting down.\n")); | 173 | FPRINTF (stderr, "%s", _("Request ignored as ARM is shutting down.\n")); |
174 | ret = 1; | 174 | ret = 1; |
175 | break; | 175 | break; |
176 | case GNUNET_ARM_PROCESS_COMMUNICATION_ERROR: | 176 | case GNUNET_ARM_PROCESS_COMMUNICATION_ERROR: |
177 | fprintf (stderr, _("Error communicating with ARM service.\n")); | 177 | FPRINTF (stderr, "%s", _("Error communicating with ARM service.\n")); |
178 | ret = 1; | 178 | ret = 1; |
179 | break; | 179 | break; |
180 | case GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT: | 180 | case GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT: |
181 | fprintf (stderr, _("Timeout communicating with ARM service.\n")); | 181 | FPRINTF (stderr, "%s", _("Timeout communicating with ARM service.\n")); |
182 | ret = 1; | 182 | ret = 1; |
183 | break; | 183 | break; |
184 | case GNUNET_ARM_PROCESS_FAILURE: | 184 | case GNUNET_ARM_PROCESS_FAILURE: |
185 | fprintf (stderr, _("Operation failed.\n")); | 185 | FPRINTF (stderr, "%s", _("Operation failed.\n")); |
186 | ret = 1; | 186 | ret = 1; |
187 | break; | 187 | break; |
188 | default: | 188 | default: |
189 | fprintf (stderr, _("Unknown response code from ARM.\n")); | 189 | FPRINTF (stderr, "%s", _("Unknown response code from ARM.\n")); |
190 | break; | 190 | break; |
191 | } | 191 | } |
192 | GNUNET_SCHEDULER_add_continuation (&cps_loop, NULL, | 192 | GNUNET_SCHEDULER_add_continuation (&cps_loop, NULL, |
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index 029ed145a..df0efb7f5 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -303,15 +303,15 @@ do_nothing_restarted_notify_task (void *cls, | |||
303 | #if LOG_BACKOFF | 303 | #if LOG_BACKOFF |
304 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | 304 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
305 | { | 305 | { |
306 | fprintf (killLogFilePtr, "%d.Reason is shutdown!\n", trialCount); | 306 | FPRINTF (killLogFilePtr, "%d.Reason is shutdown!\n", trialCount); |
307 | } | 307 | } |
308 | else if ((tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0) | 308 | else if ((tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT) != 0) |
309 | { | 309 | { |
310 | fprintf (killLogFilePtr, "%d.Reason is timeout!\n", trialCount); | 310 | FPRINTF (killLogFilePtr, "%d.Reason is timeout!\n", trialCount); |
311 | } | 311 | } |
312 | else if ((tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE) != 0) | 312 | else if ((tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE) != 0) |
313 | { | 313 | { |
314 | fprintf (killLogFilePtr, "%d.Service is running!\n", trialCount); | 314 | FPRINTF (killLogFilePtr, "%d.Service is running!\n", trialCount); |
315 | } | 315 | } |
316 | #endif | 316 | #endif |
317 | GNUNET_SCHEDULER_add_now (&kill_task, &a); | 317 | GNUNET_SCHEDULER_add_now (&kill_task, &a); |
@@ -345,7 +345,7 @@ kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
345 | waitedFor = GNUNET_TIME_absolute_get_duration (startedWaitingAt); | 345 | waitedFor = GNUNET_TIME_absolute_get_duration (startedWaitingAt); |
346 | 346 | ||
347 | #if LOG_BACKOFF | 347 | #if LOG_BACKOFF |
348 | fprintf (killLogFilePtr, "Waited for: %llu ms\n", | 348 | FPRINTF (killLogFilePtr, "Waited for: %llu ms\n", |
349 | (unsigned long long) waitedFor.rel_value); | 349 | (unsigned long long) waitedFor.rel_value); |
350 | #endif | 350 | #endif |
351 | } | 351 | } |
diff --git a/src/arm/test_gnunet_service_manager.c b/src/arm/test_gnunet_service_manager.c index 2be86e79f..dd12bbd31 100644 --- a/src/arm/test_gnunet_service_manager.c +++ b/src/arm/test_gnunet_service_manager.c | |||
@@ -161,13 +161,13 @@ main (int argc, char *argv[]) | |||
161 | { | 161 | { |
162 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 162 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |
163 | "gethostname"); | 163 | "gethostname"); |
164 | fprintf (stderr, | 164 | FPRINTF (stderr, |
165 | "Failed to determine my own hostname, testcase not run.\n"); | 165 | "Failed to determine my own hostname, testcase not run.\n", NULL); |
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
168 | if (NULL == gethostbyname (hostname)) | 168 | if (NULL == gethostbyname (hostname)) |
169 | { | 169 | { |
170 | fprintf (stderr, | 170 | FPRINTF (stderr, |
171 | "Failed to resolve my hostname `%s', testcase not run.\n", | 171 | "Failed to resolve my hostname `%s', testcase not run.\n", |
172 | hostname); | 172 | hostname); |
173 | return 0; | 173 | return 0; |
diff --git a/src/ats-test/test_transport_ats_multiple_peers.c b/src/ats-test/test_transport_ats_multiple_peers.c index e9d0baf25..7425ff45d 100644 --- a/src/ats-test/test_transport_ats_multiple_peers.c +++ b/src/ats-test/test_transport_ats_multiple_peers.c | |||
@@ -225,7 +225,7 @@ evaluate_measurements () | |||
225 | stddev[0] /= c_new; | 225 | stddev[0] /= c_new; |
226 | stddev[0] = sqrt (stddev[0]); | 226 | stddev[0] = sqrt (stddev[0]); |
227 | if (!machine_parsable) | 227 | if (!machine_parsable) |
228 | fprintf (stderr, "new, %i measurements, average: %f stddev: %f\n", c_new, | 228 | FPRINTF (stderr, "new, %i measurements, average: %f stddev: %f\n", c_new, |
229 | average[0], stddev[0]); | 229 | average[0], stddev[0]); |
230 | 230 | ||
231 | average[1] = 0.0; | 231 | average[1] = 0.0; |
@@ -245,7 +245,7 @@ evaluate_measurements () | |||
245 | stddev[1] /= c_modified; | 245 | stddev[1] /= c_modified; |
246 | stddev[1] = sqrt (stddev[1]); | 246 | stddev[1] = sqrt (stddev[1]); |
247 | if (!machine_parsable) | 247 | if (!machine_parsable) |
248 | fprintf (stderr, "modified, %i measurements, average: %f stddev: %f\n", | 248 | FPRINTF (stderr, "modified, %i measurements, average: %f stddev: %f\n", |
249 | c_modified, average[1], stddev[1]); | 249 | c_modified, average[1], stddev[1]); |
250 | 250 | ||
251 | average[2] = 0.0; | 251 | average[2] = 0.0; |
@@ -265,11 +265,11 @@ evaluate_measurements () | |||
265 | stddev[2] = sqrt (stddev[2]); | 265 | stddev[2] = sqrt (stddev[2]); |
266 | 266 | ||
267 | if (!machine_parsable) | 267 | if (!machine_parsable) |
268 | fprintf (stderr, "unmodified, %i measurements, average: %f stddev: %f\n", | 268 | FPRINTF (stderr, "unmodified, %i measurements, average: %f stddev: %f\n", |
269 | c_unmodified, average[2], stddev[2]); | 269 | c_unmodified, average[2], stddev[2]); |
270 | 270 | ||
271 | if (machine_parsable) | 271 | if (machine_parsable) |
272 | fprintf (stderr, | 272 | FPRINTF (stderr, |
273 | "peers,%i,mechs,%llu," "new,%i,%f,%f," "mod,%i,%f,%f," | 273 | "peers,%i,mechs,%llu," "new,%i,%f,%f," "mod,%i,%f,%f," |
274 | "unmod,%i,%f,%f\n", peers - 1, | 274 | "unmod,%i,%f,%f\n", peers - 1, |
275 | (unsigned long long) results_unmodified[0].mechs, c_new, | 275 | (unsigned long long) results_unmodified[0].mechs, c_new, |
@@ -337,7 +337,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
337 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All %llu peers connected\n", value); | 337 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All %llu peers connected\n", value); |
338 | #if !VERBOSE | 338 | #if !VERBOSE |
339 | if (!machine_parsable) | 339 | if (!machine_parsable) |
340 | fprintf (stderr, "%i", count); | 340 | FPRINTF (stderr, "%i", count); |
341 | #endif | 341 | #endif |
342 | } | 342 | } |
343 | 343 | ||
@@ -395,7 +395,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
395 | } | 395 | } |
396 | count++; | 396 | count++; |
397 | #if VERBOSE | 397 | #if VERBOSE |
398 | fprintf (stderr, "(new: %i / modified: %i / unmodified: %i) of %i \n", | 398 | FPRINTF (stderr, "(new: %i / modified: %i / unmodified: %i) of %i \n", |
399 | c_new, c_modified, c_unmodified, MEASUREMENTS); | 399 | c_new, c_modified, c_unmodified, MEASUREMENTS); |
400 | #endif | 400 | #endif |
401 | if ((c_modified >= MEASUREMENTS) && (c_new >= MEASUREMENTS) && | 401 | if ((c_modified >= MEASUREMENTS) && (c_new >= MEASUREMENTS) && |
@@ -403,7 +403,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
403 | { | 403 | { |
404 | #if !VERBOSE | 404 | #if !VERBOSE |
405 | if (!machine_parsable) | 405 | if (!machine_parsable) |
406 | fprintf (stdout, "\n"); | 406 | FPRINTF (stdout, "\n"); |
407 | #endif | 407 | #endif |
408 | if (stats_task != GNUNET_SCHEDULER_NO_TASK) | 408 | if (stats_task != GNUNET_SCHEDULER_NO_TASK) |
409 | { | 409 | { |
@@ -418,7 +418,7 @@ stats_cb (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
418 | current.timestamp = value; | 418 | current.timestamp = value; |
419 | #if !VERBOSE | 419 | #if !VERBOSE |
420 | if (!machine_parsable) | 420 | if (!machine_parsable) |
421 | fprintf (stderr, "..%i", count); | 421 | FPRINTF (stderr, "..%i", count); |
422 | #endif | 422 | #endif |
423 | return GNUNET_OK; | 423 | return GNUNET_OK; |
424 | } | 424 | } |
diff --git a/src/block/test_block.c b/src/block/test_block.c index d1d3edb96..927029ed8 100644 --- a/src/block/test_block.c +++ b/src/block/test_block.c | |||
@@ -72,6 +72,6 @@ main (int argc, char *argv[]) | |||
72 | GNUNET_BLOCK_context_destroy (ctx); | 72 | GNUNET_BLOCK_context_destroy (ctx); |
73 | GNUNET_CONFIGURATION_destroy (cfg); | 73 | GNUNET_CONFIGURATION_destroy (cfg); |
74 | if (ret != 0) | 74 | if (ret != 0) |
75 | fprintf (stderr, "Tests failed: %d\n", ret); | 75 | FPRINTF (stderr, "Tests failed: %d\n", ret); |
76 | return ret; | 76 | return ret; |
77 | } | 77 | } |
diff --git a/src/chat/gnunet-chat.c b/src/chat/gnunet-chat.c index 53884a299..af4eb53f3 100644 --- a/src/chat/gnunet-chat.c +++ b/src/chat/gnunet-chat.c | |||
@@ -89,7 +89,7 @@ do_help (const char *args, const void *xtra); | |||
89 | static int | 89 | static int |
90 | join_cb (void *cls) | 90 | join_cb (void *cls) |
91 | { | 91 | { |
92 | fprintf (stdout, _("Joined\n")); | 92 | FPRINTF (stdout, "%s", _("Joined\n")); |
93 | return GNUNET_OK; | 93 | return GNUNET_OK; |
94 | } | 94 | } |
95 | 95 | ||
@@ -163,7 +163,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room, | |||
163 | break; | 163 | break; |
164 | } | 164 | } |
165 | time = GNUNET_STRINGS_absolute_time_to_string (timestamp); | 165 | time = GNUNET_STRINGS_absolute_time_to_string (timestamp); |
166 | fprintf (stdout, fmt, time, nick, message); | 166 | FPRINTF (stdout, fmt, time, nick, message); |
167 | GNUNET_free (nick); | 167 | GNUNET_free (nick); |
168 | GNUNET_free (time); | 168 | GNUNET_free (time); |
169 | return GNUNET_OK; | 169 | return GNUNET_OK; |
@@ -190,7 +190,7 @@ confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room, | |||
190 | char *nick; | 190 | char *nick; |
191 | 191 | ||
192 | nick = GNUNET_PSEUDONYM_id_to_name (cfg, receiver); | 192 | nick = GNUNET_PSEUDONYM_id_to_name (cfg, receiver); |
193 | fprintf (stdout, _("'%s' acknowledged message #%d\n"), nick, orig_seq_number); | 193 | FPRINTF (stdout, _("'%s' acknowledged message #%d\n"), nick, orig_seq_number); |
194 | return GNUNET_OK; | 194 | return GNUNET_OK; |
195 | } | 195 | } |
196 | 196 | ||
@@ -219,7 +219,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
219 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 219 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), |
220 | &id); | 220 | &id); |
221 | nick = GNUNET_PSEUDONYM_id_to_name (cfg, &id); | 221 | nick = GNUNET_PSEUDONYM_id_to_name (cfg, &id); |
222 | fprintf (stdout, | 222 | FPRINTF (stdout, |
223 | member_info != | 223 | member_info != |
224 | NULL ? _("`%s' entered the room\n") : _("`%s' left the room\n"), | 224 | NULL ? _("`%s' entered the room\n") : _("`%s' left the room\n"), |
225 | nick); | 225 | nick); |
@@ -281,11 +281,11 @@ do_join (const char *arg, const void *xtra) | |||
281 | &confirmation_cb, NULL, &me); | 281 | &confirmation_cb, NULL, &me); |
282 | if (NULL == room) | 282 | if (NULL == room) |
283 | { | 283 | { |
284 | fprintf (stdout, _("Could not change username\n")); | 284 | FPRINTF (stdout, "%s", _("Could not change username\n")); |
285 | return GNUNET_SYSERR; | 285 | return GNUNET_SYSERR; |
286 | } | 286 | } |
287 | my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me); | 287 | my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me); |
288 | fprintf (stdout, _("Joining room `%s' as user `%s'...\n"), room_name, | 288 | FPRINTF (stdout, _("Joining room `%s' as user `%s'...\n"), room_name, |
289 | my_name); | 289 | my_name); |
290 | GNUNET_free (my_name); | 290 | GNUNET_free (my_name); |
291 | return GNUNET_OK; | 291 | return GNUNET_OK; |
@@ -313,11 +313,11 @@ do_nick (const char *msg, const void *xtra) | |||
313 | &confirmation_cb, NULL, &me); | 313 | &confirmation_cb, NULL, &me); |
314 | if (NULL == room) | 314 | if (NULL == room) |
315 | { | 315 | { |
316 | fprintf (stdout, _("Could not change username\n")); | 316 | FPRINTF (stdout, "%s", _("Could not change username\n")); |
317 | return GNUNET_SYSERR; | 317 | return GNUNET_SYSERR; |
318 | } | 318 | } |
319 | my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me); | 319 | my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me); |
320 | fprintf (stdout, _("Changed username to `%s'\n"), my_name); | 320 | FPRINTF (stdout, _("Changed username to `%s'\n"), my_name); |
321 | GNUNET_free (my_name); | 321 | GNUNET_free (my_name); |
322 | return GNUNET_OK; | 322 | return GNUNET_OK; |
323 | } | 323 | } |
@@ -330,7 +330,7 @@ do_names (const char *msg, const void *xtra) | |||
330 | struct UserList *pos; | 330 | struct UserList *pos; |
331 | GNUNET_HashCode pid; | 331 | GNUNET_HashCode pid; |
332 | 332 | ||
333 | fprintf (stdout, _("Users in room `%s': "), room_name); | 333 | FPRINTF (stdout, _("Users in room `%s': "), room_name); |
334 | pos = users; | 334 | pos = users; |
335 | while (NULL != pos) | 335 | while (NULL != pos) |
336 | { | 336 | { |
@@ -338,11 +338,11 @@ do_names (const char *msg, const void *xtra) | |||
338 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 338 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), |
339 | &pid); | 339 | &pid); |
340 | name = GNUNET_PSEUDONYM_id_to_name (cfg, &pid); | 340 | name = GNUNET_PSEUDONYM_id_to_name (cfg, &pid); |
341 | fprintf (stdout, "`%s' ", name); | 341 | FPRINTF (stdout, "`%s' ", name); |
342 | GNUNET_free (name); | 342 | GNUNET_free (name); |
343 | pos = pos->next; | 343 | pos = pos->next; |
344 | } | 344 | } |
345 | fprintf (stdout, "\n"); | 345 | FPRINTF (stdout, "%s", "\n"); |
346 | return GNUNET_OK; | 346 | return GNUNET_OK; |
347 | } | 347 | } |
348 | 348 | ||
@@ -368,7 +368,7 @@ do_send_pm (const char *msg, const void *xtra) | |||
368 | 368 | ||
369 | if (NULL == strstr (msg, " ")) | 369 | if (NULL == strstr (msg, " ")) |
370 | { | 370 | { |
371 | fprintf (stderr, _("Syntax: /msg USERNAME MESSAGE")); | 371 | FPRINTF (stderr, "%s", _("Syntax: /msg USERNAME MESSAGE")); |
372 | return GNUNET_OK; | 372 | return GNUNET_OK; |
373 | } | 373 | } |
374 | user = GNUNET_strdup (msg); | 374 | user = GNUNET_strdup (msg); |
@@ -376,7 +376,7 @@ do_send_pm (const char *msg, const void *xtra) | |||
376 | msg += strlen (user) + 1; | 376 | msg += strlen (user) + 1; |
377 | if (GNUNET_OK != GNUNET_PSEUDONYM_name_to_id (cfg, user, &uid)) | 377 | if (GNUNET_OK != GNUNET_PSEUDONYM_name_to_id (cfg, user, &uid)) |
378 | { | 378 | { |
379 | fprintf (stderr, _("Unknown user `%s'\n"), user); | 379 | FPRINTF (stderr, _("Unknown user `%s'\n"), user); |
380 | GNUNET_free (user); | 380 | GNUNET_free (user); |
381 | return GNUNET_OK; | 381 | return GNUNET_OK; |
382 | } | 382 | } |
@@ -392,7 +392,7 @@ do_send_pm (const char *msg, const void *xtra) | |||
392 | } | 392 | } |
393 | if (NULL == pos) | 393 | if (NULL == pos) |
394 | { | 394 | { |
395 | fprintf (stderr, _("User `%s' is currently not in the room!\n"), user); | 395 | FPRINTF (stderr, _("User `%s' is currently not in the room!\n"), user); |
396 | GNUNET_free (user); | 396 | GNUNET_free (user); |
397 | return GNUNET_OK; | 397 | return GNUNET_OK; |
398 | } | 398 | } |
@@ -445,7 +445,7 @@ do_quit (const char *args, const void *xtra) | |||
445 | static int | 445 | static int |
446 | do_unknown (const char *msg, const void *xtra) | 446 | do_unknown (const char *msg, const void *xtra) |
447 | { | 447 | { |
448 | fprintf (stderr, _("Unknown command `%s'\n"), msg); | 448 | FPRINTF (stderr, _("Unknown command `%s'\n"), msg); |
449 | return GNUNET_OK; | 449 | return GNUNET_OK; |
450 | } | 450 | } |
451 | 451 | ||
@@ -510,20 +510,20 @@ do_help (const char *args, const void *xtra) | |||
510 | { | 510 | { |
511 | if (0 == strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1)) | 511 | if (0 == strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1)) |
512 | { | 512 | { |
513 | fprintf (stdout, "%s\n", gettext (commands[i].helptext)); | 513 | FPRINTF (stdout, "%s\n", gettext (commands[i].helptext)); |
514 | return GNUNET_OK; | 514 | return GNUNET_OK; |
515 | } | 515 | } |
516 | i++; | 516 | i++; |
517 | } | 517 | } |
518 | i = 0; | 518 | i = 0; |
519 | fprintf (stdout, "Available commands:"); | 519 | FPRINTF (stdout, "%s", "Available commands:"); |
520 | while (commands[i].Action != &do_help) | 520 | while (commands[i].Action != &do_help) |
521 | { | 521 | { |
522 | fprintf (stdout, " %s", gettext (commands[i].command)); | 522 | FPRINTF (stdout, " %s", gettext (commands[i].command)); |
523 | i++; | 523 | i++; |
524 | } | 524 | } |
525 | fprintf (stdout, "\n"); | 525 | FPRINTF (stdout, "%s", "\n"); |
526 | fprintf (stdout, "%s\n", gettext (commands[i].helptext)); | 526 | FPRINTF (stdout, "%s\n", gettext (commands[i].helptext)); |
527 | return GNUNET_OK; | 527 | return GNUNET_OK; |
528 | } | 528 | } |
529 | 529 | ||
@@ -602,7 +602,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
602 | /* check arguments */ | 602 | /* check arguments */ |
603 | if (NULL == nickname) | 603 | if (NULL == nickname) |
604 | { | 604 | { |
605 | fprintf (stderr, _("You must specify a nickname\n")); | 605 | FPRINTF (stderr, "%s", _("You must specify a nickname\n")); |
606 | ret = -1; | 606 | ret = -1; |
607 | return; | 607 | return; |
608 | } | 608 | } |
@@ -618,7 +618,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
618 | &confirmation_cb, NULL, &me); | 618 | &confirmation_cb, NULL, &me); |
619 | if (NULL == room) | 619 | if (NULL == room) |
620 | { | 620 | { |
621 | fprintf (stderr, _("Failed to join room `%s'\n"), room_name); | 621 | FPRINTF (stderr, _("Failed to join room `%s'\n"), room_name); |
622 | GNUNET_free (room_name); | 622 | GNUNET_free (room_name); |
623 | GNUNET_free (nickname); | 623 | GNUNET_free (nickname); |
624 | GNUNET_CONTAINER_meta_data_destroy (meta); | 624 | GNUNET_CONTAINER_meta_data_destroy (meta); |
@@ -626,7 +626,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
626 | return; | 626 | return; |
627 | } | 627 | } |
628 | my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me); | 628 | my_name = GNUNET_PSEUDONYM_id_to_name (cfg, &me); |
629 | fprintf (stdout, _("Joining room `%s' as user `%s'...\n"), room_name, | 629 | FPRINTF (stdout, _("Joining room `%s' as user `%s'...\n"), room_name, |
630 | my_name); | 630 | my_name); |
631 | GNUNET_free (my_name); | 631 | GNUNET_free (my_name); |
632 | handle_cmd_task = | 632 | handle_cmd_task = |
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) |
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c index 6fc0a7217..0f4fea419 100644 --- a/src/datacache/perf_datacache.c +++ b/src/datacache/perf_datacache.c | |||
@@ -71,8 +71,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
71 | 71 | ||
72 | if (h == NULL) | 72 | if (h == NULL) |
73 | { | 73 | { |
74 | fprintf (stderr, | 74 | FPRINTF (stderr, "%s", "Failed to initialize datacache. Database likely not setup, skipping test.\n"); |
75 | "Failed to initialize datacache. Database likely not setup, skipping test.\n"); | ||
76 | return; | 75 | return; |
77 | } | 76 | } |
78 | exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); | 77 | exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); |
@@ -81,15 +80,15 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
81 | for (i = 0; i < ITERATIONS; i++) | 80 | for (i = 0; i < ITERATIONS; i++) |
82 | { | 81 | { |
83 | if (0 == i % (ITERATIONS / 80)) | 82 | if (0 == i % (ITERATIONS / 80)) |
84 | fprintf (stderr, "."); | 83 | FPRINTF (stderr, "%s", "."); |
85 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); | 84 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); |
86 | ASSERT (GNUNET_OK == | 85 | ASSERT (GNUNET_OK == |
87 | GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode), | 86 | GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode), |
88 | (const char *) &n, 1 + i % 16, exp)); | 87 | (const char *) &n, 1 + i % 16, exp)); |
89 | k = n; | 88 | k = n; |
90 | } | 89 | } |
91 | fprintf (stderr, "\n"); | 90 | FPRINTF (stderr, "%s", "\n"); |
92 | fprintf (stdout, "Stored %u items in %llums\n", ITERATIONS, | 91 | FPRINTF (stdout, "Stored %u items in %llums\n", ITERATIONS, |
93 | (unsigned long long) | 92 | (unsigned long long) |
94 | GNUNET_TIME_absolute_get_duration (start).rel_value); | 93 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
95 | GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name); | 94 | GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name); |
@@ -101,13 +100,13 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
101 | for (i = 0; i < ITERATIONS; i++) | 100 | for (i = 0; i < ITERATIONS; i++) |
102 | { | 101 | { |
103 | if (0 == i % (ITERATIONS / 80)) | 102 | if (0 == i % (ITERATIONS / 80)) |
104 | fprintf (stderr, "."); | 103 | FPRINTF (stderr, "%s", "."); |
105 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); | 104 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); |
106 | GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n); | 105 | GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n); |
107 | k = n; | 106 | k = n; |
108 | } | 107 | } |
109 | fprintf (stderr, "\n"); | 108 | FPRINTF (stderr, "%s", "\n"); |
110 | fprintf (stdout, | 109 | FPRINTF (stdout, |
111 | "Found %u/%u items in %llums (%u were deleted during storage processing)\n", | 110 | "Found %u/%u items in %llums (%u were deleted during storage processing)\n", |
112 | found, ITERATIONS, | 111 | found, ITERATIONS, |
113 | (unsigned long long) | 112 | (unsigned long long) |
@@ -169,7 +168,7 @@ main (int argc, char *argv[]) | |||
169 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, | 168 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, |
170 | "perf-datacache", "nohelp", options, &run, NULL); | 169 | "perf-datacache", "nohelp", options, &run, NULL); |
171 | if (ok != 0) | 170 | if (ok != 0) |
172 | fprintf (stderr, "Missed some perfcases: %d\n", ok); | 171 | FPRINTF (stderr, "Missed some perfcases: %d\n", ok); |
173 | return ok; | 172 | return ok; |
174 | } | 173 | } |
175 | 174 | ||
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c index 6c70807c1..ff3640b6f 100644 --- a/src/datacache/test_datacache.c +++ b/src/datacache/test_datacache.c | |||
@@ -71,8 +71,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
71 | h = GNUNET_DATACACHE_create (cfg, "testcache"); | 71 | h = GNUNET_DATACACHE_create (cfg, "testcache"); |
72 | if (h == NULL) | 72 | if (h == NULL) |
73 | { | 73 | { |
74 | fprintf (stderr, | 74 | FPRINTF (stderr, |
75 | "Failed to initialize datacache. Database likely not setup, skipping test.\n"); | 75 | "Failed to initialize datacache. Database likely not setup, skipping test.\n", NULL); |
76 | return; | 76 | return; |
77 | } | 77 | } |
78 | exp = GNUNET_TIME_absolute_get (); | 78 | exp = GNUNET_TIME_absolute_get (); |
@@ -154,7 +154,7 @@ main (int argc, char *argv[]) | |||
154 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, | 154 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, |
155 | "test-datacache", "nohelp", options, &run, NULL); | 155 | "test-datacache", "nohelp", options, &run, NULL); |
156 | if (ok != 0) | 156 | if (ok != 0) |
157 | fprintf (stderr, "Missed some testcases: %d\n", ok); | 157 | FPRINTF (stderr, "Missed some testcases: %d\n", ok); |
158 | return ok; | 158 | return ok; |
159 | } | 159 | } |
160 | 160 | ||
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c index d3681da8e..468972c9e 100644 --- a/src/datacache/test_datacache_quota.c +++ b/src/datacache/test_datacache_quota.c | |||
@@ -60,8 +60,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
60 | 60 | ||
61 | if (h == NULL) | 61 | if (h == NULL) |
62 | { | 62 | { |
63 | fprintf (stderr, | 63 | FPRINTF (stderr, "%s", "Failed to initialize datacache. Database likely not setup, skipping test.\n"); |
64 | "Failed to initialize datacache. Database likely not setup, skipping test.\n"); | ||
65 | return; | 64 | return; |
66 | } | 65 | } |
67 | exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); | 66 | exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); |
@@ -69,7 +68,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
69 | memset (&k, 0, sizeof (GNUNET_HashCode)); | 68 | memset (&k, 0, sizeof (GNUNET_HashCode)); |
70 | for (i = 0; i < 10; i++) | 69 | for (i = 0; i < 10; i++) |
71 | { | 70 | { |
72 | fprintf (stderr, "."); | 71 | FPRINTF (stderr, "%s", "."); |
73 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); | 72 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); |
74 | for (j = i; j < sizeof (buf); j += 10) | 73 | for (j = i; j < sizeof (buf); j += 10) |
75 | { | 74 | { |
@@ -80,11 +79,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
80 | } | 79 | } |
81 | k = n; | 80 | k = n; |
82 | } | 81 | } |
83 | fprintf (stderr, "\n"); | 82 | FPRINTF (stderr, "%s", "\n"); |
84 | memset (&k, 0, sizeof (GNUNET_HashCode)); | 83 | memset (&k, 0, sizeof (GNUNET_HashCode)); |
85 | for (i = 0; i < 10; i++) | 84 | for (i = 0; i < 10; i++) |
86 | { | 85 | { |
87 | fprintf (stderr, "."); | 86 | FPRINTF (stderr, "%s", "."); |
88 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); | 87 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); |
89 | if (i < 2) | 88 | if (i < 2) |
90 | ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); | 89 | ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); |
@@ -92,7 +91,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
92 | ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); | 91 | ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); |
93 | k = n; | 92 | k = n; |
94 | } | 93 | } |
95 | fprintf (stderr, "\n"); | 94 | FPRINTF (stderr, "%s", "\n"); |
96 | GNUNET_DATACACHE_destroy (h); | 95 | GNUNET_DATACACHE_destroy (h); |
97 | return; | 96 | return; |
98 | FAILURE: | 97 | FAILURE: |
@@ -145,7 +144,7 @@ main (int argc, char *argv[]) | |||
145 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, | 144 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, |
146 | "test-datacache-quota", "nohelp", options, &run, NULL); | 145 | "test-datacache-quota", "nohelp", options, &run, NULL); |
147 | if (ok != 0) | 146 | if (ok != 0) |
148 | fprintf (stderr, "Missed some testcases: %d\n", ok); | 147 | FPRINTF (stderr, "Missed some testcases: %d\n", ok); |
149 | return ok; | 148 | return ok; |
150 | } | 149 | } |
151 | 150 | ||
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index 372a61f7d..106d40684 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -123,7 +123,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiratio | |||
123 | return; | 123 | return; |
124 | } | 124 | } |
125 | #if REPORT_ID | 125 | #if REPORT_ID |
126 | fprintf (stderr, "I"); | 126 | FPRINTF (stderr, "%s", "I"); |
127 | #endif | 127 | #endif |
128 | stored_bytes += crc->size; | 128 | stored_bytes += crc->size; |
129 | stored_ops++; | 129 | stored_ops++; |
@@ -166,7 +166,7 @@ remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, | |||
166 | return; | 166 | return; |
167 | } | 167 | } |
168 | #if REPORT_ID | 168 | #if REPORT_ID |
169 | fprintf (stderr, "D"); | 169 | FPRINTF (stderr, "%s", "D"); |
170 | #endif | 170 | #endif |
171 | GNUNET_assert (GNUNET_OK == success); | 171 | GNUNET_assert (GNUNET_OK == success); |
172 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); | 172 | GNUNET_SCHEDULER_add_now (&run_continuation, crc); |
@@ -284,7 +284,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c | |||
284 | 284 | ||
285 | if (success != GNUNET_YES) | 285 | if (success != GNUNET_YES) |
286 | { | 286 | { |
287 | fprintf (stderr, | 287 | FPRINTF (stderr, |
288 | "Test 'put' operation failed with error `%s' database likely not setup, skipping test.", | 288 | "Test 'put' operation failed with error `%s' database likely not setup, skipping test.", |
289 | msg); | 289 | msg); |
290 | GNUNET_free (crc); | 290 | GNUNET_free (crc); |
@@ -314,7 +314,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
314 | (GNUNET_TIME_UNIT_SECONDS), 0, 1, | 314 | (GNUNET_TIME_UNIT_SECONDS), 0, 1, |
315 | GNUNET_TIME_UNIT_MINUTES, &run_tests, crc)) | 315 | GNUNET_TIME_UNIT_MINUTES, &run_tests, crc)) |
316 | { | 316 | { |
317 | fprintf (stderr, "Test 'put' operation failed.\n"); | 317 | FPRINTF (stderr, "%s", "Test 'put' operation failed.\n"); |
318 | ok = 1; | 318 | ok = 1; |
319 | GNUNET_free (crc); | 319 | GNUNET_free (crc); |
320 | } | 320 | } |
@@ -396,7 +396,7 @@ main (int argc, char *argv[]) | |||
396 | if (pos != plugin_name) | 396 | if (pos != plugin_name) |
397 | pos[0] = '.'; | 397 | pos[0] = '.'; |
398 | #if REPORT_ID | 398 | #if REPORT_ID |
399 | fprintf (stderr, "\n"); | 399 | FPRINTF (stderr, "%s", "\n"); |
400 | #endif | 400 | #endif |
401 | GNUNET_DISK_directory_remove (dir_name); | 401 | GNUNET_DISK_directory_remove (dir_name); |
402 | return ret; | 402 | return ret; |
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 8f552c4eb..6106b11cb 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c | |||
@@ -135,7 +135,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k) | |||
135 | GNUNET_CRYPTO_random_u32 | 135 | GNUNET_CRYPTO_random_u32 |
136 | (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), &msg)) | 136 | (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), &msg)) |
137 | { | 137 | { |
138 | fprintf (stderr, "ERROR: `%s'\n", msg); | 138 | FPRINTF (stderr, "ERROR: `%s'\n", msg); |
139 | GNUNET_free_non_null (msg); | 139 | GNUNET_free_non_null (msg); |
140 | return; | 140 | return; |
141 | } | 141 | } |
@@ -165,7 +165,7 @@ iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
165 | hits[i / 8] |= (1 << (i % 8)); | 165 | hits[i / 8] |= (1 << (i % 8)); |
166 | 166 | ||
167 | #if VERBOSE | 167 | #if VERBOSE |
168 | fprintf (stderr, "Found result type=%u, priority=%u, size=%u, expire=%llu\n", | 168 | FPRINTF (stderr, "Found result type=%u, priority=%u, size=%u, expire=%llu\n", |
169 | type, priority, size, (unsigned long long) expiration.abs_value); | 169 | type, priority, size, (unsigned long long) expiration.abs_value); |
170 | #endif | 170 | #endif |
171 | crc->cnt++; | 171 | crc->cnt++; |
@@ -344,7 +344,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
344 | crc->phase = RP_ERROR; | 344 | crc->phase = RP_ERROR; |
345 | } | 345 | } |
346 | #if VERBOSE | 346 | #if VERBOSE |
347 | fprintf (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt); | 347 | FPRINTF (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt); |
348 | #endif | 348 | #endif |
349 | switch (crc->phase) | 349 | switch (crc->phase) |
350 | { | 350 | { |
@@ -422,7 +422,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
422 | GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name); | 422 | GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name); |
423 | if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env))) | 423 | if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env))) |
424 | { | 424 | { |
425 | fprintf (stderr, "Failed to load plugin `%s'!\n", name); | 425 | FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); |
426 | return NULL; | 426 | return NULL; |
427 | } | 427 | } |
428 | GNUNET_free (libname); | 428 | GNUNET_free (libname); |
@@ -441,8 +441,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
441 | api = load_plugin (c); | 441 | api = load_plugin (c); |
442 | if (api == NULL) | 442 | if (api == NULL) |
443 | { | 443 | { |
444 | fprintf (stderr, | 444 | FPRINTF (stderr, |
445 | "Could not initialize plugin, assuming database not configured. Test not run!\n"); | 445 | "Could not initialize plugin, assuming database not configured. Test not run!\n", NULL); |
446 | return; | 446 | return; |
447 | } | 447 | } |
448 | crc = GNUNET_malloc (sizeof (struct CpsRunContext)); | 448 | crc = GNUNET_malloc (sizeof (struct CpsRunContext)); |
@@ -478,7 +478,7 @@ check () | |||
478 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, | 478 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, |
479 | "perf-plugin-datastore", "nohelp", options, &run, NULL); | 479 | "perf-plugin-datastore", "nohelp", options, &run, NULL); |
480 | if (ok != 0) | 480 | if (ok != 0) |
481 | fprintf (stderr, "Missed some testcases: %u\n", ok); | 481 | FPRINTF (stderr, "Missed some testcases: %u\n", ok); |
482 | return ok; | 482 | return ok; |
483 | } | 483 | } |
484 | 484 | ||
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index 942e0a11e..df6d3af62 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c | |||
@@ -193,10 +193,10 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size, | |||
193 | return; | 193 | return; |
194 | } | 194 | } |
195 | #if 0 | 195 | #if 0 |
196 | fprintf (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n", | 196 | FPRINTF (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n", |
197 | GNUNET_h2s (key), (unsigned int) size, type, | 197 | GNUNET_h2s (key), (unsigned int) size, type, |
198 | (unsigned long long) expiration.abs_value); | 198 | (unsigned long long) expiration.abs_value); |
199 | fprintf (stderr, | 199 | FPRINTF (stderr, |
200 | "Check value iteration %d wants size %u, type %d, expire %llu\n", i, | 200 | "Check value iteration %d wants size %u, type %d, expire %llu\n", i, |
201 | (unsigned int) get_size (i), get_type (i), | 201 | (unsigned int) get_size (i), get_type (i), |
202 | (unsigned long long) get_expiration (i).abs_value); | 202 | (unsigned long long) get_expiration (i).abs_value); |
@@ -461,11 +461,11 @@ run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiratio | |||
461 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 461 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
462 | return; | 462 | return; |
463 | case GNUNET_NO: | 463 | case GNUNET_NO: |
464 | fprintf (stderr, "Test 'put' operation failed, key already exists (!?)\n"); | 464 | FPRINTF (stderr, "%s", "Test 'put' operation failed, key already exists (!?)\n"); |
465 | GNUNET_free (crc); | 465 | GNUNET_free (crc); |
466 | return; | 466 | return; |
467 | case GNUNET_SYSERR: | 467 | case GNUNET_SYSERR: |
468 | fprintf (stderr, | 468 | FPRINTF (stderr, |
469 | "Test 'put' operation failed with error `%s' database likely not setup, skipping test.\n", | 469 | "Test 'put' operation failed with error `%s' database likely not setup, skipping test.\n", |
470 | msg); | 470 | msg); |
471 | GNUNET_free (crc); | 471 | GNUNET_free (crc); |
@@ -495,7 +495,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
495 | (GNUNET_TIME_UNIT_SECONDS), 0, 1, | 495 | (GNUNET_TIME_UNIT_SECONDS), 0, 1, |
496 | GNUNET_TIME_UNIT_MINUTES, &run_tests, crc)) | 496 | GNUNET_TIME_UNIT_MINUTES, &run_tests, crc)) |
497 | { | 497 | { |
498 | fprintf (stderr, "Test 'put' operation failed.\n"); | 498 | FPRINTF (stderr, "%s", "Test 'put' operation failed.\n"); |
499 | ok = 1; | 499 | ok = 1; |
500 | GNUNET_free (crc); | 500 | GNUNET_free (crc); |
501 | } | 501 | } |
@@ -548,7 +548,7 @@ check () | |||
548 | proc = NULL; | 548 | proc = NULL; |
549 | #endif | 549 | #endif |
550 | if (ok != 0) | 550 | if (ok != 0) |
551 | fprintf (stderr, "Missed some testcases: %u\n", ok); | 551 | FPRINTF (stderr, "Missed some testcases: %u\n", ok); |
552 | return ok; | 552 | return ok; |
553 | } | 553 | } |
554 | 554 | ||
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index 3cb8ed94a..20a405d07 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -252,7 +252,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c | |||
252 | 252 | ||
253 | if (success != GNUNET_YES) | 253 | if (success != GNUNET_YES) |
254 | { | 254 | { |
255 | fprintf (stderr, | 255 | FPRINTF (stderr, |
256 | "Test 'put' operation failed with error `%s' database likely not setup, skipping test.", | 256 | "Test 'put' operation failed with error `%s' database likely not setup, skipping test.", |
257 | msg); | 257 | msg); |
258 | GNUNET_free (crc); | 258 | GNUNET_free (crc); |
@@ -282,7 +282,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
282 | (GNUNET_TIME_UNIT_SECONDS), 0, 1, | 282 | (GNUNET_TIME_UNIT_SECONDS), 0, 1, |
283 | GNUNET_TIME_UNIT_MINUTES, &run_tests, crc)) | 283 | GNUNET_TIME_UNIT_MINUTES, &run_tests, crc)) |
284 | { | 284 | { |
285 | fprintf (stderr, "Test 'put' operation failed.\n"); | 285 | FPRINTF (stderr, "%s", "Test 'put' operation failed.\n"); |
286 | GNUNET_free (crc); | 286 | GNUNET_free (crc); |
287 | ok = 1; | 287 | ok = 1; |
288 | } | 288 | } |
@@ -331,7 +331,7 @@ check () | |||
331 | GNUNET_OS_process_close (proc); | 331 | GNUNET_OS_process_close (proc); |
332 | proc = NULL; | 332 | proc = NULL; |
333 | if (ok != 0) | 333 | if (ok != 0) |
334 | fprintf (stderr, "Missed some testcases: %u\n", ok); | 334 | FPRINTF (stderr, "Missed some testcases: %u\n", ok); |
335 | return ok; | 335 | return ok; |
336 | } | 336 | } |
337 | 337 | ||
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c index 3504945ae..ca894ff33 100644 --- a/src/datastore/test_plugin_datastore.c +++ b/src/datastore/test_plugin_datastore.c | |||
@@ -118,7 +118,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k) | |||
118 | msg = NULL; | 118 | msg = NULL; |
119 | prio = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100); | 119 | prio = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100); |
120 | #if VERBOSE | 120 | #if VERBOSE |
121 | fprintf (stderr, "putting type %u, anon %u under key %s\n", i + 1, i, | 121 | FPRINTF (stderr, "putting type %u, anon %u under key %s\n", i + 1, i, |
122 | GNUNET_h2s (&key)); | 122 | GNUNET_h2s (&key)); |
123 | #endif | 123 | #endif |
124 | if (GNUNET_OK != api->put (api->cls, &key, size, value, i + 1 /* type */ , | 124 | if (GNUNET_OK != api->put (api->cls, &key, size, value, i + 1 /* type */ , |
@@ -131,7 +131,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k) | |||
131 | GNUNET_CRYPTO_random_u32 | 131 | GNUNET_CRYPTO_random_u32 |
132 | (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), &msg)) | 132 | (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), &msg)) |
133 | { | 133 | { |
134 | fprintf (stderr, "ERROR: `%s'\n", msg); | 134 | FPRINTF (stderr, "ERROR: `%s'\n", msg); |
135 | GNUNET_free_non_null (msg); | 135 | GNUNET_free_non_null (msg); |
136 | return; | 136 | return; |
137 | } | 137 | } |
@@ -160,7 +160,7 @@ iterate_one_shot (void *cls, const GNUNET_HashCode * key, uint32_t size, | |||
160 | guid = uid; | 160 | guid = uid; |
161 | crc->phase++; | 161 | crc->phase++; |
162 | #if VERBOSE | 162 | #if VERBOSE |
163 | fprintf (stderr, | 163 | FPRINTF (stderr, |
164 | "Found result type=%u, priority=%u, size=%u, expire=%llu, key %s\n", | 164 | "Found result type=%u, priority=%u, size=%u, expire=%llu, key %s\n", |
165 | type, priority, size, (unsigned long long) expiration.abs_value, | 165 | type, priority, size, (unsigned long long) expiration.abs_value, |
166 | GNUNET_h2s (key)); | 166 | GNUNET_h2s (key)); |
@@ -230,7 +230,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
230 | crc->phase = RP_ERROR; | 230 | crc->phase = RP_ERROR; |
231 | } | 231 | } |
232 | #if VERBOSE | 232 | #if VERBOSE |
233 | fprintf (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt); | 233 | FPRINTF (stderr, "In phase %d, iteration %u\n", crc->phase, crc->cnt); |
234 | #endif | 234 | #endif |
235 | switch (crc->phase) | 235 | switch (crc->phase) |
236 | { | 236 | { |
@@ -324,7 +324,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
324 | GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name); | 324 | GNUNET_asprintf (&libname, "libgnunet_plugin_datastore_%s", name); |
325 | if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env))) | 325 | if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env))) |
326 | { | 326 | { |
327 | fprintf (stderr, "Failed to load plugin `%s'!\n", name); | 327 | FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); |
328 | return NULL; | 328 | return NULL; |
329 | } | 329 | } |
330 | GNUNET_free (libname); | 330 | GNUNET_free (libname); |
@@ -343,8 +343,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
343 | api = load_plugin (c); | 343 | api = load_plugin (c); |
344 | if (api == NULL) | 344 | if (api == NULL) |
345 | { | 345 | { |
346 | fprintf (stderr, | 346 | FPRINTF (stderr, |
347 | "Could not initialize plugin, assuming database not configured. Test not run!\n"); | 347 | "Could not initialize plugin, assuming database not configured. Test not run!\n", NULL); |
348 | return; | 348 | return; |
349 | } | 349 | } |
350 | crc = GNUNET_malloc (sizeof (struct CpsRunContext)); | 350 | crc = GNUNET_malloc (sizeof (struct CpsRunContext)); |
@@ -378,7 +378,7 @@ check () | |||
378 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, | 378 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, |
379 | "test-plugin-datastore", "nohelp", options, &run, NULL); | 379 | "test-plugin-datastore", "nohelp", options, &run, NULL); |
380 | if (ok != 0) | 380 | if (ok != 0) |
381 | fprintf (stderr, "Missed some testcases: %u\n", ok); | 381 | FPRINTF (stderr, "Missed some testcases: %u\n", ok); |
382 | return ok; | 382 | return ok; |
383 | } | 383 | } |
384 | 384 | ||
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 763ff8e6f..6ad4b30f8 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -129,7 +129,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
129 | unsigned int put_path_length, enum GNUNET_BLOCK_Type type, | 129 | unsigned int put_path_length, enum GNUNET_BLOCK_Type type, |
130 | size_t size, const void *data) | 130 | size_t size, const void *data) |
131 | { | 131 | { |
132 | fprintf (stdout, "Result %d, type %d:\n%.*s\n", result_count, type, | 132 | FPRINTF (stdout, "Result %d, type %d:\n%.*s\n", result_count, type, |
133 | (unsigned int) size, (char *) data); | 133 | (unsigned int) size, (char *) data); |
134 | result_count++; | 134 | result_count++; |
135 | } | 135 | } |
@@ -155,7 +155,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
155 | if (query_key == NULL) | 155 | if (query_key == NULL) |
156 | { | 156 | { |
157 | if (verbose) | 157 | if (verbose) |
158 | fprintf (stderr, "Must provide key for DHT GET!\n"); | 158 | FPRINTF (stderr, "%s", "Must provide key for DHT GET!\n"); |
159 | ret = 1; | 159 | ret = 1; |
160 | return; | 160 | return; |
161 | } | 161 | } |
@@ -165,12 +165,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
165 | if (dht_handle == NULL) | 165 | if (dht_handle == NULL) |
166 | { | 166 | { |
167 | if (verbose) | 167 | if (verbose) |
168 | fprintf (stderr, "Couldn't connect to DHT service!\n"); | 168 | FPRINTF (stderr, "%s", "Couldn't connect to DHT service!\n"); |
169 | ret = 1; | 169 | ret = 1; |
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | else if (verbose) | 172 | else if (verbose) |
173 | fprintf (stderr, "Connected to DHT service!\n"); | 173 | FPRINTF (stderr, "%s", "Connected to DHT service!\n"); |
174 | 174 | ||
175 | if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */ | 175 | if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */ |
176 | query_type = GNUNET_BLOCK_TYPE_TEST; | 176 | query_type = GNUNET_BLOCK_TYPE_TEST; |
@@ -182,7 +182,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
182 | absolute_timeout = GNUNET_TIME_relative_to_absolute (timeout); | 182 | absolute_timeout = GNUNET_TIME_relative_to_absolute (timeout); |
183 | 183 | ||
184 | if (verbose) | 184 | if (verbose) |
185 | fprintf (stderr, "Issuing GET request for %s!\n", query_key); | 185 | FPRINTF (stderr, "Issuing GET request for %s!\n", query_key); |
186 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 186 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
187 | (absolute_timeout), &cleanup_task, NULL); | 187 | (absolute_timeout), &cleanup_task, NULL); |
188 | get_handle = | 188 | get_handle = |
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c index 079a8866e..ef5ae5ea7 100644 --- a/src/dht/gnunet-dht-put.c +++ b/src/dht/gnunet-dht-put.c | |||
@@ -97,7 +97,7 @@ void | |||
97 | message_sent_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 97 | message_sent_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
98 | { | 98 | { |
99 | if (verbose) | 99 | if (verbose) |
100 | fprintf (stderr, _("PUT request sent!\n")); | 100 | FPRINTF (stderr, "%s", _("PUT request sent!\n")); |
101 | GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); | 101 | GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
102 | } | 102 | } |
103 | 103 | ||
@@ -121,7 +121,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
121 | 121 | ||
122 | if ((query_key == NULL) || (data == NULL)) | 122 | if ((query_key == NULL) || (data == NULL)) |
123 | { | 123 | { |
124 | fprintf (stderr, _("Must provide KEY and DATA for DHT put!\n")); | 124 | FPRINTF (stderr, "%s", _("Must provide KEY and DATA for DHT put!\n")); |
125 | ret = 1; | 125 | ret = 1; |
126 | return; | 126 | return; |
127 | } | 127 | } |
@@ -129,12 +129,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
129 | dht_handle = GNUNET_DHT_connect (cfg, 1); | 129 | dht_handle = GNUNET_DHT_connect (cfg, 1); |
130 | if (dht_handle == NULL) | 130 | if (dht_handle == NULL) |
131 | { | 131 | { |
132 | fprintf (stderr, _("Could not connect to %s service!\n"), "DHT"); | 132 | FPRINTF (stderr, _("Could not connect to %s service!\n"), "DHT"); |
133 | ret = 1; | 133 | ret = 1; |
134 | return; | 134 | return; |
135 | } | 135 | } |
136 | else if (verbose) | 136 | else if (verbose) |
137 | fprintf (stderr, _("Connected to %s service!\n"), "DHT"); | 137 | FPRINTF (stderr, _("Connected to %s service!\n"), "DHT"); |
138 | 138 | ||
139 | if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */ | 139 | if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */ |
140 | query_type = GNUNET_BLOCK_TYPE_TEST; | 140 | query_type = GNUNET_BLOCK_TYPE_TEST; |
@@ -149,7 +149,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
149 | expiration_seconds)); | 149 | expiration_seconds)); |
150 | 150 | ||
151 | if (verbose) | 151 | if (verbose) |
152 | fprintf (stderr, _("Issuing put request for `%s' with data `%s'!\n"), | 152 | FPRINTF (stderr, _("Issuing put request for `%s' with data `%s'!\n"), |
153 | query_key, data); | 153 | query_key, data); |
154 | GNUNET_DHT_put (dht_handle, &key, replication, GNUNET_DHT_RO_NONE, query_type, | 154 | GNUNET_DHT_put (dht_handle, &key, replication, GNUNET_DHT_RO_NONE, query_type, |
155 | strlen (data), data, expiration, timeout, &message_sent_cont, | 155 | strlen (data), data, expiration, timeout, &message_sent_cont, |
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index e636c08ba..4ec2f2ae9 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c | |||
@@ -97,7 +97,7 @@ static int ok; | |||
97 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 97 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
98 | 98 | ||
99 | #if VERBOSE | 99 | #if VERBOSE |
100 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 100 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
101 | #else | 101 | #else |
102 | #define OKPP do { ok++; } while (0) | 102 | #define OKPP do { ok++; } while (0) |
103 | #endif | 103 | #endif |
@@ -133,7 +133,7 @@ end_badly () | |||
133 | { | 133 | { |
134 | /* do work here */ | 134 | /* do work here */ |
135 | #if VERBOSE | 135 | #if VERBOSE |
136 | fprintf (stderr, "Ending on an unhappy note.\n"); | 136 | FPRINTF (stderr, "%s", "Ending on an unhappy note.\n"); |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | if ((retry_context.peer_ctx != NULL) && | 139 | if ((retry_context.peer_ctx != NULL) && |
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 1a4fbaf13..8aba2743d 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c | |||
@@ -220,7 +220,7 @@ shutdown_callback (void *cls, const char *emsg) | |||
220 | { | 220 | { |
221 | if (emsg != NULL) | 221 | if (emsg != NULL) |
222 | { | 222 | { |
223 | fprintf (stderr, "Failed to shutdown testing topology: %s\n", emsg); | 223 | FPRINTF (stderr, "Failed to shutdown testing topology: %s\n", emsg); |
224 | if (ok == 0) | 224 | if (ok == 0) |
225 | ok = 2; | 225 | ok = 2; |
226 | } | 226 | } |
@@ -311,7 +311,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
311 | struct StatMaster *sm = cls; | 311 | struct StatMaster *sm = cls; |
312 | 312 | ||
313 | stats[sm->value].total += value; | 313 | stats[sm->value].total += value; |
314 | fprintf (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem, | 314 | FPRINTF (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem, |
315 | name, (unsigned long long) value); | 315 | name, (unsigned long long) value); |
316 | return GNUNET_OK; | 316 | return GNUNET_OK; |
317 | } | 317 | } |
@@ -369,7 +369,7 @@ stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
369 | i = 0; | 369 | i = 0; |
370 | while (stats[i].name != NULL) | 370 | while (stats[i].name != NULL) |
371 | { | 371 | { |
372 | fprintf (stderr, "Total : %12s/%50s = %12llu\n", stats[i].subsystem, | 372 | FPRINTF (stderr, "Total : %12s/%50s = %12llu\n", stats[i].subsystem, |
373 | stats[i].name, (unsigned long long) stats[i].total); | 373 | stats[i].name, (unsigned long long) stats[i].total); |
374 | i++; | 374 | i++; |
375 | } | 375 | } |
@@ -439,7 +439,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
439 | struct TestGetContext *test_get; | 439 | struct TestGetContext *test_get; |
440 | 440 | ||
441 | die_task = GNUNET_SCHEDULER_NO_TASK; | 441 | die_task = GNUNET_SCHEDULER_NO_TASK; |
442 | fprintf (stderr, "Failing test with error: `%s'!\n", emsg); | 442 | FPRINTF (stderr, "Failing test with error: `%s'!\n", emsg); |
443 | while (NULL != (test_put = all_puts_head)) | 443 | while (NULL != (test_put = all_puts_head)) |
444 | { | 444 | { |
445 | if (test_put->task != GNUNET_SCHEDULER_NO_TASK) | 445 | if (test_put->task != GNUNET_SCHEDULER_NO_TASK) |
@@ -484,7 +484,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
484 | if (test_get->succeeded != GNUNET_YES) | 484 | if (test_get->succeeded != GNUNET_YES) |
485 | { | 485 | { |
486 | gets_failed++; | 486 | gets_failed++; |
487 | fprintf (stderr, "Get from peer %s for key %s failed!\n", | 487 | FPRINTF (stderr, "Get from peer %s for key %s failed!\n", |
488 | GNUNET_i2s (&test_get->daemon->id), GNUNET_h2s (&search_key)); | 488 | GNUNET_i2s (&test_get->daemon->id), GNUNET_h2s (&search_key)); |
489 | } | 489 | } |
490 | GNUNET_assert (test_get->get_handle != NULL); | 490 | GNUNET_assert (test_get->get_handle != NULL); |
@@ -500,7 +500,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
500 | if ((gets_failed > 10) && (outstanding_gets == 0)) | 500 | if ((gets_failed > 10) && (outstanding_gets == 0)) |
501 | { | 501 | { |
502 | /* Had more than 10% failures */ | 502 | /* Had more than 10% failures */ |
503 | fprintf (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed, | 503 | FPRINTF (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed, |
504 | gets_failed); | 504 | gets_failed); |
505 | GNUNET_SCHEDULER_cancel (die_task); | 505 | GNUNET_SCHEDULER_cancel (die_task); |
506 | ok = 1; | 506 | ok = 1; |
@@ -510,7 +510,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
510 | } | 510 | } |
511 | if ((gets_completed + gets_failed == num_peers * num_peers) && (outstanding_gets == 0)) /* All gets successful */ | 511 | if ((gets_completed + gets_failed == num_peers * num_peers) && (outstanding_gets == 0)) /* All gets successful */ |
512 | { | 512 | { |
513 | fprintf (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed, | 513 | FPRINTF (stderr, "%llu gets succeeded, %llu gets failed!\n", gets_completed, |
514 | gets_failed); | 514 | gets_failed); |
515 | GNUNET_SCHEDULER_cancel (die_task); | 515 | GNUNET_SCHEDULER_cancel (die_task); |
516 | ok = 0; | 516 | ok = 0; |
@@ -552,19 +552,19 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
552 | { | 552 | { |
553 | unsigned int i; | 553 | unsigned int i; |
554 | 554 | ||
555 | fprintf (stderr, "PUT (%u) Path: ", test_get->uid); | 555 | FPRINTF (stderr, "PUT (%u) Path: ", test_get->uid); |
556 | for (i = 0; i < put_path_length; i++) | 556 | for (i = 0; i < put_path_length; i++) |
557 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); | 557 | FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); |
558 | fprintf (stderr, "\n"); | 558 | FPRINTF (stderr, "%s", "\n"); |
559 | } | 559 | } |
560 | if (get_path != NULL) | 560 | if (get_path != NULL) |
561 | { | 561 | { |
562 | unsigned int i; | 562 | unsigned int i; |
563 | 563 | ||
564 | fprintf (stderr, "GET (%u) Path: ", test_get->uid); | 564 | FPRINTF (stderr, "GET (%u) Path: ", test_get->uid); |
565 | for (i = 0; i < get_path_length; i++) | 565 | for (i = 0; i < get_path_length; i++) |
566 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); | 566 | FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); |
567 | fprintf (stderr, "%s%s\n", get_path_length > 0 ? "->" : "", | 567 | FPRINTF (stderr, "%s%s\n", get_path_length > 0 ? "->" : "", |
568 | GNUNET_i2s (&test_get->daemon->id)); | 568 | GNUNET_i2s (&test_get->daemon->id)); |
569 | } | 569 | } |
570 | #endif | 570 | #endif |
@@ -572,7 +572,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
572 | if ((0 != memcmp (&search_key, key, sizeof (GNUNET_HashCode))) || | 572 | if ((0 != memcmp (&search_key, key, sizeof (GNUNET_HashCode))) || |
573 | (0 != memcmp (original_data, data, sizeof (original_data)))) | 573 | (0 != memcmp (original_data, data, sizeof (original_data)))) |
574 | { | 574 | { |
575 | fprintf (stderr, "Key or data is not the same as was inserted!\n"); | 575 | FPRINTF (stderr, "%s", "Key or data is not the same as was inserted!\n"); |
576 | return; | 576 | return; |
577 | } | 577 | } |
578 | gets_completed++; | 578 | gets_completed++; |
@@ -639,7 +639,7 @@ start_gets (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
639 | struct TestGetContext *test_get; | 639 | struct TestGetContext *test_get; |
640 | 640 | ||
641 | #if VERBOSE | 641 | #if VERBOSE |
642 | fprintf (stderr, "Issuing %llu GETs\n", | 642 | FPRINTF (stderr, "Issuing %llu GETs\n", |
643 | (unsigned long long) (num_peers * num_peers)); | 643 | (unsigned long long) (num_peers * num_peers)); |
644 | #endif | 644 | #endif |
645 | for (i = 0; i < num_peers; i++) | 645 | for (i = 0; i < num_peers; i++) |
@@ -697,7 +697,7 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
697 | GNUNET_assert (test_put->dht_handle != NULL); | 697 | GNUNET_assert (test_put->dht_handle != NULL); |
698 | outstanding_puts++; | 698 | outstanding_puts++; |
699 | #if VERBOSE > 2 | 699 | #if VERBOSE > 2 |
700 | fprintf (stderr, "PUT %u at `%s'\n", test_put->uid, | 700 | FPRINTF (stderr, "PUT %u at `%s'\n", test_put->uid, |
701 | GNUNET_i2s (&test_put->daemon->id)); | 701 | GNUNET_i2s (&test_put->daemon->id)); |
702 | #endif | 702 | #endif |
703 | GNUNET_DHT_put (test_put->dht_handle, &key, 1, route_option, | 703 | GNUNET_DHT_put (test_put->dht_handle, &key, 1, route_option, |
@@ -725,7 +725,7 @@ run_dht_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
725 | die_task = | 725 | die_task = |
726 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, | 726 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, |
727 | "from setup puts/gets"); | 727 | "from setup puts/gets"); |
728 | fprintf (stderr, "Issuing %llu PUTs (one per peer)\n", | 728 | FPRINTF (stderr, "Issuing %llu PUTs (one per peer)\n", |
729 | (unsigned long long) (num_peers * num_peers)); | 729 | (unsigned long long) (num_peers * num_peers)); |
730 | for (i = 0; i < num_peers * num_peers; i++) | 730 | for (i = 0; i < num_peers * num_peers; i++) |
731 | { | 731 | { |
@@ -750,7 +750,7 @@ startup_done (void *cls, const char *emsg) | |||
750 | { | 750 | { |
751 | if (emsg != NULL) | 751 | if (emsg != NULL) |
752 | { | 752 | { |
753 | fprintf (stderr, "Failed to setup topology: %s\n", emsg); | 753 | FPRINTF (stderr, "Failed to setup topology: %s\n", emsg); |
754 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, "topology setup failed"); | 754 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, "topology setup failed"); |
755 | return; | 755 | return; |
756 | } | 756 | } |
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c index 04198b48b..2adfda0ef 100644 --- a/src/dht/test_dht_twopeer.c +++ b/src/dht/test_dht_twopeer.c | |||
@@ -138,7 +138,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
138 | { | 138 | { |
139 | const char *emsg = cls; | 139 | const char *emsg = cls; |
140 | 140 | ||
141 | fprintf (stderr, "Error: %s\n", emsg); | 141 | FPRINTF (stderr, "Error: %s\n", emsg); |
142 | if (curr_get_ctx.retry_task != GNUNET_SCHEDULER_NO_TASK) | 142 | if (curr_get_ctx.retry_task != GNUNET_SCHEDULER_NO_TASK) |
143 | { | 143 | { |
144 | GNUNET_SCHEDULER_cancel (curr_get_ctx.retry_task); | 144 | GNUNET_SCHEDULER_cancel (curr_get_ctx.retry_task); |
@@ -183,7 +183,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
183 | if (0 != | 183 | if (0 != |
184 | memcmp (&get_context->peer->hashPubKey, key, sizeof (GNUNET_HashCode))) | 184 | memcmp (&get_context->peer->hashPubKey, key, sizeof (GNUNET_HashCode))) |
185 | { | 185 | { |
186 | fprintf (stderr, "??\n"); | 186 | FPRINTF (stderr, "%s", "??\n"); |
187 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 187 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
188 | "Key returned is not the same key as was searched for!\n"); | 188 | "Key returned is not the same key as was searched for!\n"); |
189 | GNUNET_SCHEDULER_cancel (die_task); | 189 | GNUNET_SCHEDULER_cancel (die_task); |
@@ -192,7 +192,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
192 | "key mismatch in get response!\n"); | 192 | "key mismatch in get response!\n"); |
193 | return; | 193 | return; |
194 | } | 194 | } |
195 | fprintf (stderr, "!\n"); | 195 | FPRINTF (stderr, "%s", "!\n"); |
196 | if (get_context->retry_task != GNUNET_SCHEDULER_NO_TASK) | 196 | if (get_context->retry_task != GNUNET_SCHEDULER_NO_TASK) |
197 | { | 197 | { |
198 | GNUNET_SCHEDULER_cancel (get_context->retry_task); | 198 | GNUNET_SCHEDULER_cancel (get_context->retry_task); |
@@ -234,7 +234,7 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
234 | get_context->get_attempts); | 234 | get_context->get_attempts); |
235 | else | 235 | else |
236 | { | 236 | { |
237 | fprintf (stderr, "?\n"); | 237 | FPRINTF (stderr, "%s", "?\n"); |
238 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 238 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
239 | "Too many attempts failed, ending test!\n", | 239 | "Too many attempts failed, ending test!\n", |
240 | get_context->get_attempts); | 240 | get_context->get_attempts); |
@@ -244,7 +244,7 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
244 | "GET attempt failed, ending test!\n"); | 244 | "GET attempt failed, ending test!\n"); |
245 | return; | 245 | return; |
246 | } | 246 | } |
247 | fprintf (stderr, "."); | 247 | FPRINTF (stderr, "%s", "."); |
248 | get_context->get_attempts++; | 248 | get_context->get_attempts++; |
249 | get_context->retry_task = | 249 | get_context->retry_task = |
250 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 250 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
@@ -381,7 +381,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
381 | { | 381 | { |
382 | if (emsg != NULL) | 382 | if (emsg != NULL) |
383 | { | 383 | { |
384 | fprintf (stderr, "Failed to start daemon: `%s'\n", emsg); | 384 | FPRINTF (stderr, "Failed to start daemon: `%s'\n", emsg); |
385 | return; | 385 | return; |
386 | } | 386 | } |
387 | GNUNET_assert (id != NULL); | 387 | GNUNET_assert (id != NULL); |
diff --git a/src/dht/test_dht_twopeer_path_tracking.c b/src/dht/test_dht_twopeer_path_tracking.c index 61a3df0a4..c30a3f327 100644 --- a/src/dht/test_dht_twopeer_path_tracking.c +++ b/src/dht/test_dht_twopeer_path_tracking.c | |||
@@ -219,17 +219,17 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
219 | #if VERBOSE | 219 | #if VERBOSE |
220 | if (put_path != NULL) | 220 | if (put_path != NULL) |
221 | { | 221 | { |
222 | fprintf (stderr, "PUT Path: "); | 222 | FPRINTF (stderr, "%s", "PUT Path: "); |
223 | for (i = 0; i < put_path_length; i++) | 223 | for (i = 0; i < put_path_length; i++) |
224 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); | 224 | FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); |
225 | fprintf (stderr, "\n"); | 225 | FPRINTF (stderr, "%s", "\n"); |
226 | } | 226 | } |
227 | if (get_path != NULL) | 227 | if (get_path != NULL) |
228 | { | 228 | { |
229 | fprintf (stderr, "GET Path: "); | 229 | FPRINTF (stderr, "%s", "GET Path: "); |
230 | for (i = 0; i < get_path_length; i++) | 230 | for (i = 0; i < get_path_length; i++) |
231 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); | 231 | FPRINTF (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); |
232 | fprintf (stderr, "\n"); | 232 | FPRINTF (stderr, "%s", "\n"); |
233 | } | 233 | } |
234 | #endif | 234 | #endif |
235 | 235 | ||
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index 2e4962964..435bb2a60 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c | |||
@@ -274,8 +274,8 @@ finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
274 | #endif | 274 | #endif |
275 | if (dotOutFile != NULL) | 275 | if (dotOutFile != NULL) |
276 | { | 276 | { |
277 | fprintf (dotOutFile, "}"); | ||
278 | fclose (dotOutFile); | 277 | fclose (dotOutFile); |
278 | FPRINTF (dotOutFile, "%s", "}"); | ||
279 | } | 279 | } |
280 | 280 | ||
281 | ok = 0; | 281 | ok = 0; |
@@ -382,7 +382,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
382 | 382 | ||
383 | if (dotOutFile != NULL) | 383 | if (dotOutFile != NULL) |
384 | { | 384 | { |
385 | fprintf (dotOutFile, "}"); | 385 | FPRINTF (dotOutFile, "%s", "}"); |
386 | fclose (dotOutFile); | 386 | fclose (dotOutFile); |
387 | } | 387 | } |
388 | } | 388 | } |
@@ -896,18 +896,18 @@ all_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
896 | if (dotOutFile != NULL) | 896 | if (dotOutFile != NULL) |
897 | { | 897 | { |
898 | if (distance == 1) | 898 | if (distance == 1) |
899 | fprintf (dotOutFile, "\tn%s -- n%s;\n", d->shortname, second_shortname); | 899 | FPRINTF (dotOutFile, "\tn%s -- n%s;\n", d->shortname, second_shortname); |
900 | else if (distance == 2) | 900 | else if (distance == 2) |
901 | fprintf (dotOutFile, "\tn%s -- n%s [color=blue];\n", d->shortname, | 901 | FPRINTF (dotOutFile, "\tn%s -- n%s [color=blue];\n", d->shortname, |
902 | second_shortname); | 902 | second_shortname); |
903 | else if (distance == 3) | 903 | else if (distance == 3) |
904 | fprintf (dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname, | 904 | FPRINTF (dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname, |
905 | second_shortname); | 905 | second_shortname); |
906 | else if (distance == 4) | 906 | else if (distance == 4) |
907 | fprintf (dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname, | 907 | FPRINTF (dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname, |
908 | second_shortname); | 908 | second_shortname); |
909 | else | 909 | else |
910 | fprintf (dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname, | 910 | FPRINTF (dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname, |
911 | second_shortname); | 911 | second_shortname); |
912 | } | 912 | } |
913 | GNUNET_free (second_shortname); | 913 | GNUNET_free (second_shortname); |
@@ -1067,7 +1067,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1067 | dotOutFile = fopen (dotOutFileName, "w"); | 1067 | dotOutFile = fopen (dotOutFileName, "w"); |
1068 | if (dotOutFile != NULL) | 1068 | if (dotOutFile != NULL) |
1069 | { | 1069 | { |
1070 | fprintf (dotOutFile, "strict graph G {\n"); | 1070 | FPRINTF (dotOutFile, "%s", "strict graph G {\n"); |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | #if VERBOSE | 1073 | #if VERBOSE |
diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c index 1f7a1776a..cbfb8efe4 100644 --- a/src/fragmentation/test_fragmentation.c +++ b/src/fragmentation/test_fragmentation.c | |||
@@ -91,7 +91,7 @@ proc_msgs (void *cls, const struct GNUNET_MessageHeader *hdr) | |||
91 | const char *buf; | 91 | const char *buf; |
92 | 92 | ||
93 | #if DETAILS | 93 | #if DETAILS |
94 | fprintf (stderr, "!"); /* message complete, good! */ | 94 | FPRINTF (stderr, "%s", "!"); /* message complete, good! */ |
95 | #endif | 95 | #endif |
96 | buf = (const char *) hdr; | 96 | buf = (const char *) hdr; |
97 | for (i = sizeof (struct GNUNET_MessageHeader); i < ntohs (hdr->size); i++) | 97 | for (i = sizeof (struct GNUNET_MessageHeader); i < ntohs (hdr->size); i++) |
@@ -99,7 +99,7 @@ proc_msgs (void *cls, const struct GNUNET_MessageHeader *hdr) | |||
99 | total++; | 99 | total++; |
100 | #if ! DETAILS | 100 | #if ! DETAILS |
101 | if (0 == (total % (NUM_MSGS / 100))) | 101 | if (0 == (total % (NUM_MSGS / 100))) |
102 | fprintf (stderr, "."); | 102 | FPRINTF (stderr, "%s", "."); |
103 | #endif | 103 | #endif |
104 | /* tolerate 10% loss, i.e. due to duplicate fragment IDs */ | 104 | /* tolerate 10% loss, i.e. due to duplicate fragment IDs */ |
105 | if ((total >= NUM_MSGS - (NUM_MSGS / 10)) && (ret != 0)) | 105 | if ((total >= NUM_MSGS - (NUM_MSGS / 10)) && (ret != 0)) |
@@ -132,7 +132,7 @@ proc_acks (void *cls, uint32_t msg_id, const struct GNUNET_MessageHeader *hdr) | |||
132 | if (ret == GNUNET_OK) | 132 | if (ret == GNUNET_OK) |
133 | { | 133 | { |
134 | #if DETAILS | 134 | #if DETAILS |
135 | fprintf (stderr, "@"); /* good ACK */ | 135 | FPRINTF (stderr, "%s", "@"); /* good ACK */ |
136 | #endif | 136 | #endif |
137 | GNUNET_FRAGMENT_context_destroy (frags[i]); | 137 | GNUNET_FRAGMENT_context_destroy (frags[i]); |
138 | frags[i] = NULL; | 138 | frags[i] = NULL; |
@@ -142,14 +142,14 @@ proc_acks (void *cls, uint32_t msg_id, const struct GNUNET_MessageHeader *hdr) | |||
142 | if (ret == GNUNET_NO) | 142 | if (ret == GNUNET_NO) |
143 | { | 143 | { |
144 | #if DETAILS | 144 | #if DETAILS |
145 | fprintf (stderr, "@"); /* good ACK */ | 145 | FPRINTF (stderr, "%s", "@"); /* good ACK */ |
146 | #endif | 146 | #endif |
147 | acks++; | 147 | acks++; |
148 | return; | 148 | return; |
149 | } | 149 | } |
150 | } | 150 | } |
151 | #if DETAILS | 151 | #if DETAILS |
152 | fprintf (stderr, "_"); /* BAD: ack that nobody feels responsible for... */ | 152 | FPRINTF (stderr, "%s", "_"); /* BAD: ack that nobody feels responsible for... */ |
153 | #endif | 153 | #endif |
154 | } | 154 | } |
155 | 155 | ||
@@ -171,21 +171,21 @@ proc_frac (void *cls, const struct GNUNET_MessageHeader *hdr) | |||
171 | } | 171 | } |
172 | if (NULL == defrag) | 172 | if (NULL == defrag) |
173 | { | 173 | { |
174 | fprintf (stderr, "E"); /* Error: frag after shutdown!? */ | 174 | FPRINTF (stderr, "%s", "E"); /* Error: frag after shutdown!? */ |
175 | return; | 175 | return; |
176 | } | 176 | } |
177 | ret = GNUNET_DEFRAGMENT_process_fragment (defrag, hdr); | 177 | ret = GNUNET_DEFRAGMENT_process_fragment (defrag, hdr); |
178 | if (ret == GNUNET_NO) | 178 | if (ret == GNUNET_NO) |
179 | { | 179 | { |
180 | #if DETAILS | 180 | #if DETAILS |
181 | fprintf (stderr, "?"); /* duplicate fragment */ | 181 | FPRINTF (stderr, "%s", "?"); /* duplicate fragment */ |
182 | #endif | 182 | #endif |
183 | dups++; | 183 | dups++; |
184 | } | 184 | } |
185 | else if (ret == GNUNET_OK) | 185 | else if (ret == GNUNET_OK) |
186 | { | 186 | { |
187 | #if DETAILS | 187 | #if DETAILS |
188 | fprintf (stderr, "."); /* good fragment */ | 188 | FPRINTF (stderr, "%s", "."); /* good fragment */ |
189 | #endif | 189 | #endif |
190 | fragc++; | 190 | fragc++; |
191 | } | 191 | } |
@@ -254,7 +254,7 @@ main (int argc, char *argv[]) | |||
254 | 100); | 254 | 100); |
255 | GNUNET_PROGRAM_run (5, argv_prog, "test-fragmentation", "nohelp", options, | 255 | GNUNET_PROGRAM_run (5, argv_prog, "test-fragmentation", "nohelp", options, |
256 | &run, NULL); | 256 | &run, NULL); |
257 | fprintf (stderr, | 257 | FPRINTF (stderr, |
258 | "\nHad %u good fragments, %u duplicate fragments, %u acks and %u simulated drops of acks\n", | 258 | "\nHad %u good fragments, %u duplicate fragments, %u acks and %u simulated drops of acks\n", |
259 | fragc, dups, acks, ack_drops); | 259 | fragc, dups, acks, ack_drops); |
260 | return ret; | 260 | return ret; |
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c index f2b99f48d..adb071e8d 100644 --- a/src/fs/gnunet-directory.c +++ b/src/fs/gnunet-directory.c | |||
@@ -129,7 +129,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
129 | 129 | ||
130 | if (NULL == args[0]) | 130 | if (NULL == args[0]) |
131 | { | 131 | { |
132 | fprintf (stderr, _("You must specify a filename to inspect.")); | 132 | FPRINTF (stderr, "%s", _("You must specify a filename to inspect.")); |
133 | ret = 1; | 133 | ret = 1; |
134 | return; | 134 | return; |
135 | } | 135 | } |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index f38805c2b..9e4a8c2f7 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -97,7 +97,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
97 | { | 97 | { |
98 | case GNUNET_FS_STATUS_DOWNLOAD_START: | 98 | case GNUNET_FS_STATUS_DOWNLOAD_START: |
99 | if (verbose > 1) | 99 | if (verbose > 1) |
100 | fprintf (stderr, _("Starting download `%s'.\n"), | 100 | FPRINTF (stderr, _("Starting download `%s'.\n"), |
101 | info->value.download.filename); | 101 | info->value.download.filename); |
102 | break; | 102 | break; |
103 | case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS: | 103 | case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS: |
@@ -108,7 +108,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
108 | 1000LL / | 108 | 1000LL / |
109 | (info->value.download. | 109 | (info->value.download. |
110 | duration.rel_value + 1)); | 110 | duration.rel_value + 1)); |
111 | fprintf (stdout, | 111 | FPRINTF (stdout, |
112 | _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"), | 112 | _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"), |
113 | info->value.download.filename, | 113 | info->value.download.filename, |
114 | (unsigned long long) info->value.download.completed, | 114 | (unsigned long long) info->value.download.completed, |
@@ -118,7 +118,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
118 | } | 118 | } |
119 | break; | 119 | break; |
120 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: | 120 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: |
121 | fprintf (stderr, _("Error downloading: %s.\n"), | 121 | FPRINTF (stderr, _("Error downloading: %s.\n"), |
122 | info->value.download.specifics.error.message); | 122 | info->value.download.specifics.error.message); |
123 | GNUNET_SCHEDULER_shutdown (); | 123 | GNUNET_SCHEDULER_shutdown (); |
124 | break; | 124 | break; |
@@ -126,7 +126,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
126 | s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 / | 126 | s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 / |
127 | (info->value.download. | 127 | (info->value.download. |
128 | duration.rel_value + 1)); | 128 | duration.rel_value + 1)); |
129 | fprintf (stdout, _("Downloading `%s' done (%s/s).\n"), | 129 | FPRINTF (stdout, _("Downloading `%s' done (%s/s).\n"), |
130 | info->value.download.filename, s); | 130 | info->value.download.filename, s); |
131 | GNUNET_free (s); | 131 | GNUNET_free (s); |
132 | if (info->value.download.dc == dc) | 132 | if (info->value.download.dc == dc) |
@@ -141,7 +141,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
141 | case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: | 141 | case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: |
142 | break; | 142 | break; |
143 | default: | 143 | default: |
144 | fprintf (stderr, _("Unexpected status: %d\n"), info->status); | 144 | FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); |
145 | break; | 145 | break; |
146 | } | 146 | } |
147 | return NULL; | 147 | return NULL; |
@@ -166,27 +166,27 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
166 | 166 | ||
167 | if (NULL == args[0]) | 167 | if (NULL == args[0]) |
168 | { | 168 | { |
169 | fprintf (stderr, _("You need to specify a URI argument.\n")); | 169 | FPRINTF (stderr, "%s", _("You need to specify a URI argument.\n")); |
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | uri = GNUNET_FS_uri_parse (args[0], &emsg); | 172 | uri = GNUNET_FS_uri_parse (args[0], &emsg); |
173 | if (NULL == uri) | 173 | if (NULL == uri) |
174 | { | 174 | { |
175 | fprintf (stderr, _("Failed to parse URI: %s\n"), emsg); | 175 | FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg); |
176 | GNUNET_free (emsg); | 176 | GNUNET_free (emsg); |
177 | ret = 1; | 177 | ret = 1; |
178 | return; | 178 | return; |
179 | } | 179 | } |
180 | if ((!GNUNET_FS_uri_test_chk (uri)) && (!GNUNET_FS_uri_test_loc (uri))) | 180 | if ((!GNUNET_FS_uri_test_chk (uri)) && (!GNUNET_FS_uri_test_loc (uri))) |
181 | { | 181 | { |
182 | fprintf (stderr, _("Only CHK or LOC URIs supported.\n")); | 182 | FPRINTF (stderr, "%s", _("Only CHK or LOC URIs supported.\n")); |
183 | ret = 1; | 183 | ret = 1; |
184 | GNUNET_FS_uri_destroy (uri); | 184 | GNUNET_FS_uri_destroy (uri); |
185 | return; | 185 | return; |
186 | } | 186 | } |
187 | if (NULL == filename) | 187 | if (NULL == filename) |
188 | { | 188 | { |
189 | fprintf (stderr, _("Target filename must be specified.\n")); | 189 | FPRINTF (stderr, "%s", _("Target filename must be specified.\n")); |
190 | ret = 1; | 190 | ret = 1; |
191 | GNUNET_FS_uri_destroy (uri); | 191 | GNUNET_FS_uri_destroy (uri); |
192 | return; | 192 | return; |
@@ -200,7 +200,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
200 | request_parallelism, GNUNET_FS_OPTIONS_END); | 200 | request_parallelism, GNUNET_FS_OPTIONS_END); |
201 | if (NULL == ctx) | 201 | if (NULL == ctx) |
202 | { | 202 | { |
203 | fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); | 203 | FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); |
204 | GNUNET_FS_uri_destroy (uri); | 204 | GNUNET_FS_uri_destroy (uri); |
205 | ret = 1; | 205 | ret = 1; |
206 | return; | 206 | return; |
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c index dc86ce984..8cf08ec28 100644 --- a/src/fs/gnunet-fs.c +++ b/src/fs/gnunet-fs.c | |||
@@ -72,9 +72,9 @@ static int | |||
72 | print_indexed (void *cls, const char *filename, const GNUNET_HashCode * file_id) | 72 | print_indexed (void *cls, const char *filename, const GNUNET_HashCode * file_id) |
73 | { | 73 | { |
74 | if (verbose) | 74 | if (verbose) |
75 | fprintf (stdout, "%s: %s\n", GNUNET_h2s (file_id), filename); | 75 | FPRINTF (stdout, "%s: %s\n", GNUNET_h2s (file_id), filename); |
76 | else | 76 | else |
77 | fprintf (stdout, "%s\n", filename); | 77 | FPRINTF (stdout, "%s\n", filename); |
78 | return GNUNET_OK; | 78 | return GNUNET_OK; |
79 | } | 79 | } |
80 | 80 | ||
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c index ce0d24506..412ddd2b0 100644 --- a/src/fs/gnunet-pseudonym.c +++ b/src/fs/gnunet-pseudonym.c | |||
@@ -100,7 +100,7 @@ ns_printer (void *cls, const char *name, const GNUNET_HashCode * id) | |||
100 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; | 100 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; |
101 | 101 | ||
102 | GNUNET_CRYPTO_hash_to_enc (id, &enc); | 102 | GNUNET_CRYPTO_hash_to_enc (id, &enc); |
103 | fprintf (stdout, "%s (%s)\n", name, (const char *) &enc); | 103 | FPRINTF (stdout, "%s (%s)\n", name, (const char *) &enc); |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
@@ -116,9 +116,9 @@ pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym, | |||
116 | GNUNET_break (0); | 116 | GNUNET_break (0); |
117 | return GNUNET_OK; | 117 | return GNUNET_OK; |
118 | } | 118 | } |
119 | fprintf (stdout, "%s (%d):\n", id, rating); | 119 | FPRINTF (stdout, "%s (%d):\n", id, rating); |
120 | GNUNET_CONTAINER_meta_data_iterate (md, &EXTRACTOR_meta_data_print, stdout); | 120 | GNUNET_CONTAINER_meta_data_iterate (md, &EXTRACTOR_meta_data_print, stdout); |
121 | fprintf (stdout, "\n"); | 121 | FPRINTF (stdout, "%s", "\n"); |
122 | GNUNET_free (id); | 122 | GNUNET_free (id); |
123 | return GNUNET_OK; | 123 | return GNUNET_OK; |
124 | } | 124 | } |
@@ -133,7 +133,7 @@ post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
133 | 133 | ||
134 | if (emsg != NULL) | 134 | if (emsg != NULL) |
135 | { | 135 | { |
136 | fprintf (stderr, "%s", emsg); | 136 | FPRINTF (stderr, "%s", emsg); |
137 | ret = 1; | 137 | ret = 1; |
138 | } | 138 | } |
139 | if (ns != NULL) | 139 | if (ns != NULL) |
@@ -237,16 +237,16 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
237 | else | 237 | else |
238 | { | 238 | { |
239 | if (ksk_uri != NULL) | 239 | if (ksk_uri != NULL) |
240 | fprintf (stderr, _("Option `%s' ignored\n"), "-k"); | 240 | FPRINTF (stderr, _("Option `%s' ignored\n"), "-k"); |
241 | } | 241 | } |
242 | } | 242 | } |
243 | } | 243 | } |
244 | else | 244 | else |
245 | { | 245 | { |
246 | if (root_identifier != NULL) | 246 | if (root_identifier != NULL) |
247 | fprintf (stderr, _("Option `%s' ignored\n"), "-r"); | 247 | FPRINTF (stderr, _("Option `%s' ignored\n"), "-r"); |
248 | if (ksk_uri != NULL) | 248 | if (ksk_uri != NULL) |
249 | fprintf (stderr, _("Option `%s' ignored\n"), "-k"); | 249 | FPRINTF (stderr, _("Option `%s' ignored\n"), "-k"); |
250 | } | 250 | } |
251 | 251 | ||
252 | post_advertising (NULL, NULL, NULL); | 252 | post_advertising (NULL, NULL, NULL); |
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index ffcdefdc6..dd3bf6810 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -115,7 +115,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
115 | if (verbose) | 115 | if (verbose) |
116 | { | 116 | { |
117 | s = GNUNET_STRINGS_relative_time_to_string (info->value.publish.eta); | 117 | s = GNUNET_STRINGS_relative_time_to_string (info->value.publish.eta); |
118 | fprintf (stdout, _("Publishing `%s' at %llu/%llu (%s remaining)\n"), | 118 | FPRINTF (stdout, _("Publishing `%s' at %llu/%llu (%s remaining)\n"), |
119 | info->value.publish.filename, | 119 | info->value.publish.filename, |
120 | (unsigned long long) info->value.publish.completed, | 120 | (unsigned long long) info->value.publish.completed, |
121 | (unsigned long long) info->value.publish.size, s); | 121 | (unsigned long long) info->value.publish.size, s); |
@@ -123,7 +123,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
123 | } | 123 | } |
124 | break; | 124 | break; |
125 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 125 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
126 | fprintf (stderr, _("Error publishing: %s.\n"), | 126 | FPRINTF (stderr, _("Error publishing: %s.\n"), |
127 | info->value.publish.specifics.error.message); | 127 | info->value.publish.specifics.error.message); |
128 | if (kill_task != GNUNET_SCHEDULER_NO_TASK) | 128 | if (kill_task != GNUNET_SCHEDULER_NO_TASK) |
129 | { | 129 | { |
@@ -134,11 +134,11 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
134 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 134 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
135 | break; | 135 | break; |
136 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: | 136 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: |
137 | fprintf (stdout, _("Publishing `%s' done.\n"), | 137 | FPRINTF (stdout, _("Publishing `%s' done.\n"), |
138 | info->value.publish.filename); | 138 | info->value.publish.filename); |
139 | s = GNUNET_FS_uri_to_string (info->value.publish.specifics. | 139 | s = GNUNET_FS_uri_to_string (info->value.publish.specifics. |
140 | completed.chk_uri); | 140 | completed.chk_uri); |
141 | fprintf (stdout, _("URI is `%s'.\n"), s); | 141 | FPRINTF (stdout, _("URI is `%s'.\n"), s); |
142 | GNUNET_free (s); | 142 | GNUNET_free (s); |
143 | if (info->value.publish.pctx == NULL) | 143 | if (info->value.publish.pctx == NULL) |
144 | { | 144 | { |
@@ -157,10 +157,10 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
157 | case GNUNET_FS_STATUS_UNINDEX_PROGRESS: | 157 | case GNUNET_FS_STATUS_UNINDEX_PROGRESS: |
158 | return NULL; | 158 | return NULL; |
159 | case GNUNET_FS_STATUS_UNINDEX_COMPLETED: | 159 | case GNUNET_FS_STATUS_UNINDEX_COMPLETED: |
160 | fprintf (stderr, _("Cleanup after abort complete.\n")); | 160 | FPRINTF (stderr, "%s", _("Cleanup after abort complete.\n")); |
161 | return NULL; | 161 | return NULL; |
162 | default: | 162 | default: |
163 | fprintf (stderr, _("Unexpected status: %d\n"), info->status); | 163 | FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); |
164 | return NULL; | 164 | return NULL; |
165 | } | 165 | } |
166 | return ""; /* non-null */ | 166 | return ""; /* non-null */ |
@@ -190,7 +190,7 @@ meta_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | |||
190 | return 0; | 190 | return 0; |
191 | if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) | 191 | if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) |
192 | return 0; | 192 | return 0; |
193 | fprintf (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data); | 193 | FPRINTF (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data); |
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
@@ -206,7 +206,7 @@ meta_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | |||
206 | static int | 206 | static int |
207 | keyword_printer (void *cls, const char *keyword, int is_mandatory) | 207 | keyword_printer (void *cls, const char *keyword, int is_mandatory) |
208 | { | 208 | { |
209 | fprintf (stdout, "\t%s\n", keyword); | 209 | FPRINTF (stdout, "\t%s\n", keyword); |
210 | return GNUNET_OK; | 210 | return GNUNET_OK; |
211 | } | 211 | } |
212 | 212 | ||
@@ -269,14 +269,14 @@ publish_inspector (void *cls, struct GNUNET_FS_FileInformation *fi, | |||
269 | fn = GNUNET_CONTAINER_meta_data_get_by_type (m, | 269 | fn = GNUNET_CONTAINER_meta_data_get_by_type (m, |
270 | EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); | 270 | EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); |
271 | fs = GNUNET_STRINGS_byte_size_fancy (length); | 271 | fs = GNUNET_STRINGS_byte_size_fancy (length); |
272 | fprintf (stdout, _("Meta data for file `%s' (%s)\n"), fn, fs); | 272 | FPRINTF (stdout, _("Meta data for file `%s' (%s)\n"), fn, fs); |
273 | GNUNET_CONTAINER_meta_data_iterate (m, &meta_printer, NULL); | 273 | GNUNET_CONTAINER_meta_data_iterate (m, &meta_printer, NULL); |
274 | fprintf (stdout, _("Keywords for file `%s' (%s)\n"), fn, fs); | 274 | FPRINTF (stdout, _("Keywords for file `%s' (%s)\n"), fn, fs); |
275 | GNUNET_free (fn); | 275 | GNUNET_free (fn); |
276 | GNUNET_free (fs); | 276 | GNUNET_free (fs); |
277 | if (NULL != *uri) | 277 | if (NULL != *uri) |
278 | GNUNET_FS_uri_ksk_get_keywords (*uri, &keyword_printer, NULL); | 278 | GNUNET_FS_uri_ksk_get_keywords (*uri, &keyword_printer, NULL); |
279 | fprintf (stdout, "\n"); | 279 | FPRINTF (stdout, "%s", "\n"); |
280 | } | 280 | } |
281 | if (GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (m)) | 281 | if (GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (m)) |
282 | GNUNET_FS_file_information_inspect (fi, &publish_inspector, fi); | 282 | GNUNET_FS_file_information_inspect (fi, &publish_inspector, fi); |
@@ -293,7 +293,7 @@ uri_sks_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, | |||
293 | { | 293 | { |
294 | if (emsg != NULL) | 294 | if (emsg != NULL) |
295 | { | 295 | { |
296 | fprintf (stderr, "%s\n", emsg); | 296 | FPRINTF (stderr, "%s\n", emsg); |
297 | ret = 1; | 297 | ret = 1; |
298 | } | 298 | } |
299 | GNUNET_FS_uri_destroy (uri); | 299 | GNUNET_FS_uri_destroy (uri); |
@@ -314,7 +314,7 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, | |||
314 | 314 | ||
315 | if (emsg != NULL) | 315 | if (emsg != NULL) |
316 | { | 316 | { |
317 | fprintf (stderr, "%s\n", emsg); | 317 | FPRINTF (stderr, "%s\n", emsg); |
318 | ret = 1; | 318 | ret = 1; |
319 | } | 319 | } |
320 | if (pseudonym != NULL) | 320 | if (pseudonym != NULL) |
@@ -322,7 +322,7 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, | |||
322 | ns = GNUNET_FS_namespace_create (ctx, pseudonym); | 322 | ns = GNUNET_FS_namespace_create (ctx, pseudonym); |
323 | if (ns == NULL) | 323 | if (ns == NULL) |
324 | { | 324 | { |
325 | fprintf (stderr, _("Failed to create namespace `%s'\n"), pseudonym); | 325 | FPRINTF (stderr, _("Failed to create namespace `%s'\n"), pseudonym); |
326 | ret = 1; | 326 | ret = 1; |
327 | } | 327 | } |
328 | else | 328 | else |
@@ -385,7 +385,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
385 | { | 385 | { |
386 | if (NULL == this_id) | 386 | if (NULL == this_id) |
387 | { | 387 | { |
388 | fprintf (stderr, _("Option `%s' is required when using option `%s'.\n"), | 388 | FPRINTF (stderr, _("Option `%s' is required when using option `%s'.\n"), |
389 | "-t", "-P"); | 389 | "-t", "-P"); |
390 | ret = -1; | 390 | ret = -1; |
391 | return; | 391 | return; |
@@ -395,14 +395,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
395 | { /* ordinary insertion checks */ | 395 | { /* ordinary insertion checks */ |
396 | if (NULL != next_id) | 396 | if (NULL != next_id) |
397 | { | 397 | { |
398 | fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"), | 398 | FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"), |
399 | "-N", "-P"); | 399 | "-N", "-P"); |
400 | ret = -1; | 400 | ret = -1; |
401 | return; | 401 | return; |
402 | } | 402 | } |
403 | if (NULL != this_id) | 403 | if (NULL != this_id) |
404 | { | 404 | { |
405 | fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"), | 405 | FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"), |
406 | "-t", "-P"); | 406 | "-t", "-P"); |
407 | ret = -1; | 407 | ret = -1; |
408 | return; | 408 | return; |
@@ -414,7 +414,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
414 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | 414 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
415 | if (NULL == ctx) | 415 | if (NULL == ctx) |
416 | { | 416 | { |
417 | fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); | 417 | FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); |
418 | ret = 1; | 418 | ret = 1; |
419 | return; | 419 | return; |
420 | } | 420 | } |
@@ -424,7 +424,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
424 | namespace = GNUNET_FS_namespace_create (ctx, pseudonym); | 424 | namespace = GNUNET_FS_namespace_create (ctx, pseudonym); |
425 | if (NULL == namespace) | 425 | if (NULL == namespace) |
426 | { | 426 | { |
427 | fprintf (stderr, _("Could not create namespace `%s'\n"), pseudonym); | 427 | FPRINTF (stderr, _("Could not create namespace `%s'\n"), pseudonym); |
428 | GNUNET_FS_stop (ctx); | 428 | GNUNET_FS_stop (ctx); |
429 | ret = 1; | 429 | ret = 1; |
430 | return; | 430 | return; |
@@ -436,7 +436,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
436 | uri = GNUNET_FS_uri_parse (uri_string, &emsg); | 436 | uri = GNUNET_FS_uri_parse (uri_string, &emsg); |
437 | if (uri == NULL) | 437 | if (uri == NULL) |
438 | { | 438 | { |
439 | fprintf (stderr, _("Failed to parse URI: %s\n"), emsg); | 439 | FPRINTF (stderr, _("Failed to parse URI: %s\n"), emsg); |
440 | GNUNET_free (emsg); | 440 | GNUNET_free (emsg); |
441 | if (namespace != NULL) | 441 | if (namespace != NULL) |
442 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); | 442 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); |
@@ -494,7 +494,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
494 | EXTRACTOR_plugin_remove_all (plugins); | 494 | EXTRACTOR_plugin_remove_all (plugins); |
495 | if (fi == NULL) | 495 | if (fi == NULL) |
496 | { | 496 | { |
497 | fprintf (stderr, _("Could not publish `%s': %s\n"), args[0], emsg); | 497 | FPRINTF (stderr, _("Could not publish `%s': %s\n"), args[0], emsg); |
498 | GNUNET_free (emsg); | 498 | GNUNET_free (emsg); |
499 | if (namespace != NULL) | 499 | if (namespace != NULL) |
500 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); | 500 | GNUNET_FS_namespace_delete (namespace, GNUNET_NO); |
@@ -517,7 +517,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
517 | GNUNET_FS_PUBLISH_OPTION_NONE); | 517 | GNUNET_FS_PUBLISH_OPTION_NONE); |
518 | if (NULL == pc) | 518 | if (NULL == pc) |
519 | { | 519 | { |
520 | fprintf (stderr, _("Could not start publishing.\n")); | 520 | FPRINTF (stderr, "%s", _("Could not start publishing.\n")); |
521 | GNUNET_FS_stop (ctx); | 521 | GNUNET_FS_stop (ctx); |
522 | ret = 1; | 522 | ret = 1; |
523 | return; | 523 | return; |
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 3a30f6c2b..c221a30f8 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -107,7 +107,7 @@ clean_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
107 | GNUNET_DISK_PERM_USER_READ | | 107 | GNUNET_DISK_PERM_USER_READ | |
108 | GNUNET_DISK_PERM_USER_WRITE)) | 108 | GNUNET_DISK_PERM_USER_WRITE)) |
109 | { | 109 | { |
110 | fprintf (stderr, | 110 | FPRINTF (stderr, |
111 | _("Failed to write directory with search results to `%s'\n"), | 111 | _("Failed to write directory with search results to `%s'\n"), |
112 | output_filename); | 112 | output_filename); |
113 | } | 113 | } |
@@ -178,7 +178,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
178 | /* ignore */ | 178 | /* ignore */ |
179 | break; | 179 | break; |
180 | case GNUNET_FS_STATUS_SEARCH_ERROR: | 180 | case GNUNET_FS_STATUS_SEARCH_ERROR: |
181 | fprintf (stderr, _("Error searching: %s.\n"), | 181 | FPRINTF (stderr, _("Error searching: %s.\n"), |
182 | info->value.search.specifics.error.message); | 182 | info->value.search.specifics.error.message); |
183 | GNUNET_SCHEDULER_shutdown (); | 183 | GNUNET_SCHEDULER_shutdown (); |
184 | break; | 184 | break; |
@@ -187,7 +187,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
187 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 187 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
188 | break; | 188 | break; |
189 | default: | 189 | default: |
190 | fprintf (stderr, _("Unexpected status: %d\n"), info->status); | 190 | FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); |
191 | break; | 191 | break; |
192 | } | 192 | } |
193 | return NULL; | 193 | return NULL; |
@@ -228,7 +228,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
228 | uri = GNUNET_FS_uri_ksk_create_from_args (argc, (const char **) args); | 228 | uri = GNUNET_FS_uri_ksk_create_from_args (argc, (const char **) args); |
229 | if (NULL == uri) | 229 | if (NULL == uri) |
230 | { | 230 | { |
231 | fprintf (stderr, _("Could not create keyword URI from arguments.\n")); | 231 | FPRINTF (stderr, "%s", _("Could not create keyword URI from arguments.\n")); |
232 | ret = 1; | 232 | ret = 1; |
233 | return; | 233 | return; |
234 | } | 234 | } |
@@ -238,7 +238,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
238 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | 238 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
239 | if (NULL == ctx) | 239 | if (NULL == ctx) |
240 | { | 240 | { |
241 | fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); | 241 | FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); |
242 | GNUNET_FS_uri_destroy (uri); | 242 | GNUNET_FS_uri_destroy (uri); |
243 | ret = 1; | 243 | ret = 1; |
244 | return; | 244 | return; |
@@ -252,7 +252,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
252 | GNUNET_FS_uri_destroy (uri); | 252 | GNUNET_FS_uri_destroy (uri); |
253 | if (NULL == sc) | 253 | if (NULL == sc) |
254 | { | 254 | { |
255 | fprintf (stderr, _("Could not start searching.\n")); | 255 | FPRINTF (stderr, "%s", _("Could not start searching.\n")); |
256 | GNUNET_FS_stop (ctx); | 256 | GNUNET_FS_stop (ctx); |
257 | ret = 1; | 257 | ret = 1; |
258 | return; | 258 | return; |
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index 25560ca10..3e8308df2 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c | |||
@@ -86,19 +86,19 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
86 | if (verbose) | 86 | if (verbose) |
87 | { | 87 | { |
88 | s = GNUNET_STRINGS_relative_time_to_string (info->value.unindex.eta); | 88 | s = GNUNET_STRINGS_relative_time_to_string (info->value.unindex.eta); |
89 | fprintf (stdout, _("Unindexing at %llu/%llu (%s remaining)\n"), | 89 | FPRINTF (stdout, _("Unindexing at %llu/%llu (%s remaining)\n"), |
90 | (unsigned long long) info->value.unindex.completed, | 90 | (unsigned long long) info->value.unindex.completed, |
91 | (unsigned long long) info->value.unindex.size, s); | 91 | (unsigned long long) info->value.unindex.size, s); |
92 | GNUNET_free (s); | 92 | GNUNET_free (s); |
93 | } | 93 | } |
94 | break; | 94 | break; |
95 | case GNUNET_FS_STATUS_UNINDEX_ERROR: | 95 | case GNUNET_FS_STATUS_UNINDEX_ERROR: |
96 | fprintf (stderr, _("Error unindexing: %s.\n"), | 96 | FPRINTF (stderr, _("Error unindexing: %s.\n"), |
97 | info->value.unindex.specifics.error.message); | 97 | info->value.unindex.specifics.error.message); |
98 | GNUNET_SCHEDULER_shutdown (); | 98 | GNUNET_SCHEDULER_shutdown (); |
99 | break; | 99 | break; |
100 | case GNUNET_FS_STATUS_UNINDEX_COMPLETED: | 100 | case GNUNET_FS_STATUS_UNINDEX_COMPLETED: |
101 | fprintf (stdout, _("Unindexing done.\n")); | 101 | FPRINTF (stdout, "%s", _("Unindexing done.\n")); |
102 | GNUNET_SCHEDULER_shutdown (); | 102 | GNUNET_SCHEDULER_shutdown (); |
103 | break; | 103 | break; |
104 | case GNUNET_FS_STATUS_UNINDEX_STOPPED: | 104 | case GNUNET_FS_STATUS_UNINDEX_STOPPED: |
@@ -106,7 +106,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
106 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 106 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
107 | break; | 107 | break; |
108 | default: | 108 | default: |
109 | fprintf (stderr, _("Unexpected status: %d\n"), info->status); | 109 | FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); |
110 | break; | 110 | break; |
111 | } | 111 | } |
112 | return NULL; | 112 | return NULL; |
@@ -138,14 +138,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
138 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); | 138 | GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END); |
139 | if (NULL == ctx) | 139 | if (NULL == ctx) |
140 | { | 140 | { |
141 | fprintf (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); | 141 | FPRINTF (stderr, _("Could not initialize `%s' subsystem.\n"), "FS"); |
142 | ret = 1; | 142 | ret = 1; |
143 | return; | 143 | return; |
144 | } | 144 | } |
145 | uc = GNUNET_FS_unindex_start (ctx, args[0], NULL); | 145 | uc = GNUNET_FS_unindex_start (ctx, args[0], NULL); |
146 | if (NULL == uc) | 146 | if (NULL == uc) |
147 | { | 147 | { |
148 | fprintf (stderr, _("Could not start unindex operation.\n")); | 148 | FPRINTF (stderr, "%s", _("Could not start unindex operation.\n")); |
149 | GNUNET_FS_stop (ctx); | 149 | GNUNET_FS_stop (ctx); |
150 | return; | 150 | return; |
151 | } | 151 | } |
diff --git a/src/fs/perf_gnunet_service_fs_p2p.c b/src/fs/perf_gnunet_service_fs_p2p.c index bb8c8d8c2..6b9b1abd5 100644 --- a/src/fs/perf_gnunet_service_fs_p2p.c +++ b/src/fs/perf_gnunet_service_fs_p2p.c | |||
@@ -120,7 +120,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
120 | { | 120 | { |
121 | struct StatMaster *sm = cls; | 121 | struct StatMaster *sm = cls; |
122 | 122 | ||
123 | fprintf (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem, | 123 | FPRINTF (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem, |
124 | name, (unsigned long long) value); | 124 | name, (unsigned long long) value); |
125 | return GNUNET_OK; | 125 | return GNUNET_OK; |
126 | } | 126 | } |
@@ -199,7 +199,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
199 | fancy = | 199 | fancy = |
200 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * | 200 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * |
201 | 1000LL / del.rel_value); | 201 | 1000LL / del.rel_value); |
202 | fprintf (stdout, "Download speed was %s/s\n", fancy); | 202 | FPRINTF (stdout, "Download speed was %s/s\n", fancy); |
203 | GNUNET_free (fancy); | 203 | GNUNET_free (fancy); |
204 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n", | 204 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n", |
205 | (unsigned long long) FILESIZE); | 205 | (unsigned long long) FILESIZE); |
diff --git a/src/fs/perf_gnunet_service_fs_p2p_trust.c b/src/fs/perf_gnunet_service_fs_p2p_trust.c index 9f5a36b7e..94b7648f8 100644 --- a/src/fs/perf_gnunet_service_fs_p2p_trust.c +++ b/src/fs/perf_gnunet_service_fs_p2p_trust.c | |||
@@ -153,7 +153,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value, | |||
153 | { | 153 | { |
154 | struct StatMaster *sm = cls; | 154 | struct StatMaster *sm = cls; |
155 | 155 | ||
156 | fprintf (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem, | 156 | FPRINTF (stderr, "Peer %2u: %12s/%50s = %12llu\n", sm->daemon, subsystem, |
157 | name, (unsigned long long) value); | 157 | name, (unsigned long long) value); |
158 | return GNUNET_OK; | 158 | return GNUNET_OK; |
159 | } | 159 | } |
@@ -234,7 +234,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
234 | fancy = | 234 | fancy = |
235 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * | 235 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * |
236 | 1000LL / del.rel_value); | 236 | 1000LL / del.rel_value); |
237 | fprintf (stderr, "Download speed of type `%s' was %s/s\n", type, fancy); | 237 | FPRINTF (stderr, "Download speed of type `%s' was %s/s\n", type, fancy); |
238 | GNUNET_free (fancy); | 238 | GNUNET_free (fancy); |
239 | if (NUM_DAEMONS != ++download_counter) | 239 | if (NUM_DAEMONS != ++download_counter) |
240 | return; /* more downloads to come */ | 240 | return; /* more downloads to come */ |
diff --git a/src/fs/test_fs_directory.c b/src/fs/test_fs_directory.c index 81012e764..96ad29cb4 100644 --- a/src/fs/test_fs_directory.c +++ b/src/fs/test_fs_directory.c | |||
@@ -59,7 +59,7 @@ processor (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri, | |||
59 | return; | 59 | return; |
60 | } | 60 | } |
61 | } | 61 | } |
62 | fprintf (stderr, "Error at %s:%d\n", __FILE__, __LINE__); | 62 | FPRINTF (stderr, "Error at %s:%d\n", __FILE__, __LINE__); |
63 | } | 63 | } |
64 | 64 | ||
65 | static int | 65 | static int |
@@ -131,7 +131,7 @@ testDirectory (unsigned int i) | |||
131 | GNUNET_FS_directory_builder_finish (db, &dlen, (void **) &data); | 131 | GNUNET_FS_directory_builder_finish (db, &dlen, (void **) &data); |
132 | s = GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration | 132 | s = GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration |
133 | (start)); | 133 | (start)); |
134 | fprintf (stdout, | 134 | FPRINTF (stdout, |
135 | "Creating directory with %u entires and total size %llu took %s\n", | 135 | "Creating directory with %u entires and total size %llu took %s\n", |
136 | i, (unsigned long long) dlen, s); | 136 | i, (unsigned long long) dlen, s); |
137 | GNUNET_free (s); | 137 | GNUNET_free (s); |
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index 19ef6e76a..93ad0cbba 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c | |||
@@ -190,14 +190,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
190 | #endif | 190 | #endif |
191 | break; | 191 | break; |
192 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 192 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
193 | fprintf (stderr, "Error publishing file: %s\n", | 193 | FPRINTF (stderr, "Error publishing file: %s\n", |
194 | event->value.publish.specifics.error.message); | 194 | event->value.publish.specifics.error.message); |
195 | GNUNET_break (0); | 195 | GNUNET_break (0); |
196 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 196 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
197 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 197 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
198 | break; | 198 | break; |
199 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: | 199 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: |
200 | fprintf (stderr, "Error downloading file: %s\n", | 200 | FPRINTF (stderr, "Error downloading file: %s\n", |
201 | event->value.download.specifics.error.message); | 201 | event->value.download.specifics.error.message); |
202 | GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); | 202 | GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); |
203 | break; | 203 | break; |
diff --git a/src/fs/test_fs_download_indexed.c b/src/fs/test_fs_download_indexed.c index 3f932f783..6592f6efa 100644 --- a/src/fs/test_fs_download_indexed.c +++ b/src/fs/test_fs_download_indexed.c | |||
@@ -191,14 +191,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
191 | #endif | 191 | #endif |
192 | break; | 192 | break; |
193 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 193 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
194 | fprintf (stderr, "Error publishing file: %s\n", | 194 | FPRINTF (stderr, "Error publishing file: %s\n", |
195 | event->value.publish.specifics.error.message); | 195 | event->value.publish.specifics.error.message); |
196 | GNUNET_break (0); | 196 | GNUNET_break (0); |
197 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 197 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
198 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 198 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
199 | break; | 199 | break; |
200 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: | 200 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: |
201 | fprintf (stderr, "Error downloading file: %s\n", | 201 | FPRINTF (stderr, "Error downloading file: %s\n", |
202 | event->value.download.specifics.error.message); | 202 | event->value.download.specifics.error.message); |
203 | GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); | 203 | GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); |
204 | break; | 204 | break; |
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index 9bc37235e..1e1ed22f8 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c | |||
@@ -211,14 +211,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
211 | #endif | 211 | #endif |
212 | break; | 212 | break; |
213 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 213 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
214 | fprintf (stderr, "Error publishing file: %s\n", | 214 | FPRINTF (stderr, "Error publishing file: %s\n", |
215 | event->value.publish.specifics.error.message); | 215 | event->value.publish.specifics.error.message); |
216 | GNUNET_break (0); | 216 | GNUNET_break (0); |
217 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 217 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
218 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 218 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
219 | break; | 219 | break; |
220 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: | 220 | case GNUNET_FS_STATUS_DOWNLOAD_ERROR: |
221 | fprintf (stderr, "Error downloading file: %s\n", | 221 | FPRINTF (stderr, "Error downloading file: %s\n", |
222 | event->value.download.specifics.error.message); | 222 | event->value.download.specifics.error.message); |
223 | GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); | 223 | GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); |
224 | break; | 224 | break; |
diff --git a/src/fs/test_fs_download_recursive.c b/src/fs/test_fs_download_recursive.c index cede523ec..29d15c492 100644 --- a/src/fs/test_fs_download_recursive.c +++ b/src/fs/test_fs_download_recursive.c | |||
@@ -213,14 +213,14 @@ eventCallback (void *cls, const GNUNET_FSUI_Event * event) | |||
213 | #endif | 213 | #endif |
214 | break; | 214 | break; |
215 | case GNUNET_FSUI_unindex_error: | 215 | case GNUNET_FSUI_unindex_error: |
216 | fprintf (stderr, "Error unindexing: %s\n", | 216 | FPRINTF (stderr, "Error unindexing: %s\n", |
217 | event->data.UnindexError.message); | 217 | event->data.UnindexError.message); |
218 | break; | 218 | break; |
219 | case GNUNET_FSUI_upload_error: | 219 | case GNUNET_FSUI_upload_error: |
220 | fprintf (stderr, "Error uploading: %s\n", event->data.UploadError.message); | 220 | FPRINTF (stderr, "Error uploading: %s\n", event->data.UploadError.message); |
221 | break; | 221 | break; |
222 | case GNUNET_FSUI_download_error: | 222 | case GNUNET_FSUI_download_error: |
223 | fprintf (stderr, "Error downloading: %s\n", | 223 | FPRINTF (stderr, "Error downloading: %s\n", |
224 | event->data.DownloadError.message); | 224 | event->data.DownloadError.message); |
225 | break; | 225 | break; |
226 | case GNUNET_FSUI_download_aborted: | 226 | case GNUNET_FSUI_download_aborted: |
@@ -277,7 +277,7 @@ main (int argc, char *argv[]) | |||
277 | GNUNET_GC_free (cfg); | 277 | GNUNET_GC_free (cfg); |
278 | return -1; | 278 | return -1; |
279 | } | 279 | } |
280 | fprintf (stderr, "Setup...\n"); | 280 | FPRINTF (stderr, "%s", "Setup...\n"); |
281 | #if START_DAEMON | 281 | #if START_DAEMON |
282 | GNUNET_disk_directory_remove (NULL, | 282 | GNUNET_disk_directory_remove (NULL, |
283 | "/tmp/gnunet-fsui-recursive_download_test/"); | 283 | "/tmp/gnunet-fsui-recursive_download_test/"); |
@@ -297,7 +297,7 @@ main (int argc, char *argv[]) | |||
297 | kuri = | 297 | kuri = |
298 | GNUNET_ECRS_keyword_command_line_to_uri (ectx, 2, | 298 | GNUNET_ECRS_keyword_command_line_to_uri (ectx, 2, |
299 | (const char **) keywords); | 299 | (const char **) keywords); |
300 | fprintf (stderr, "Uploading...\n"); | 300 | FPRINTF (stderr, "%s", "Uploading...\n"); |
301 | waitForEvent = GNUNET_FSUI_upload_completed; | 301 | waitForEvent = GNUNET_FSUI_upload_completed; |
302 | upload = | 302 | upload = |
303 | GNUNET_FSUI_upload_start (ctx, fn, | 303 | GNUNET_FSUI_upload_start (ctx, fn, |
@@ -322,7 +322,7 @@ main (int argc, char *argv[]) | |||
322 | upload = NULL; | 322 | upload = NULL; |
323 | CHECK (upURI != NULL); | 323 | CHECK (upURI != NULL); |
324 | 324 | ||
325 | fprintf (stderr, "Downloading...\n"); | 325 | FPRINTF (stderr, "%s", "Downloading...\n"); |
326 | waitForEvent = GNUNET_FSUI_download_completed; | 326 | waitForEvent = GNUNET_FSUI_download_completed; |
327 | fn43 = makeName (43); | 327 | fn43 = makeName (43); |
328 | download = | 328 | download = |
@@ -341,7 +341,7 @@ main (int argc, char *argv[]) | |||
341 | break; | 341 | break; |
342 | } | 342 | } |
343 | FAILURE: | 343 | FAILURE: |
344 | fprintf (stderr, "Cleanup...\n"); | 344 | FPRINTF (stderr, "%s", "Cleanup...\n"); |
345 | if (meta != NULL) | 345 | if (meta != NULL) |
346 | GNUNET_meta_data_destroy (meta); | 346 | GNUNET_meta_data_destroy (meta); |
347 | if (ctx != NULL) | 347 | if (ctx != NULL) |
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c index a459c565f..34ac3285e 100644 --- a/src/fs/test_fs_file_information.c +++ b/src/fs/test_fs_file_information.c | |||
@@ -151,8 +151,8 @@ testThumbnail () | |||
151 | EXTRACTOR_OPTION_DEFAULT_POLICY); | 151 | EXTRACTOR_OPTION_DEFAULT_POLICY); |
152 | if (ex == NULL) | 152 | if (ex == NULL) |
153 | { | 153 | { |
154 | fprintf (stderr, | 154 | FPRINTF (stderr, |
155 | "Test incomplete, have no GTK thumbnail extractor available.\n"); | 155 | "Test incomplete, have no GTK thumbnail extractor available.\n", NULL); |
156 | return 0; /* can not test, no thumbnailer */ | 156 | return 0; /* can not test, no thumbnailer */ |
157 | } | 157 | } |
158 | ex = EXTRACTOR_plugin_add_config (ex, "mime", | 158 | ex = EXTRACTOR_plugin_add_config (ex, "mime", |
diff --git a/src/fs/test_fs_getopt.c b/src/fs/test_fs_getopt.c index 2b0a9fca8..571346f2c 100644 --- a/src/fs/test_fs_getopt.c +++ b/src/fs/test_fs_getopt.c | |||
@@ -35,6 +35,6 @@ main (int argc, char *argv[]) | |||
35 | "WARNING", | 35 | "WARNING", |
36 | #endif | 36 | #endif |
37 | NULL); | 37 | NULL); |
38 | fprintf (stderr, "WARNING: testcase not yet written.\n"); | 38 | FPRINTF (stderr, "%s", "WARNING: testcase not yet written.\n"); |
39 | return 0; /* testcase passed */ | 39 | return 0; /* testcase passed */ |
40 | } | 40 | } |
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c index 870f51a4a..8a847ba2b 100644 --- a/src/fs/test_fs_list_indexed.c +++ b/src/fs/test_fs_list_indexed.c | |||
@@ -131,7 +131,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
131 | break; | 131 | break; |
132 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 132 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
133 | ret = event->value.publish.cctx; | 133 | ret = event->value.publish.cctx; |
134 | fprintf (stderr, "Error publishing file: %s\n", | 134 | FPRINTF (stderr, "Error publishing file: %s\n", |
135 | event->value.publish.specifics.error.message); | 135 | event->value.publish.specifics.error.message); |
136 | err = 1; | 136 | err = 1; |
137 | if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx)) | 137 | if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx)) |
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c index b1221eb82..df9a310b9 100644 --- a/src/fs/test_fs_namespace.c +++ b/src/fs/test_fs_namespace.c | |||
@@ -139,7 +139,7 @@ abort_sks_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
139 | static void | 139 | static void |
140 | do_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 140 | do_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
141 | { | 141 | { |
142 | fprintf (stderr, "Operation timed out\n"); | 142 | FPRINTF (stderr, "%s", "Operation timed out\n"); |
143 | kill_task = GNUNET_SCHEDULER_NO_TASK; | 143 | kill_task = GNUNET_SCHEDULER_NO_TASK; |
144 | abort_sks_search_task (NULL, tc); | 144 | abort_sks_search_task (NULL, tc); |
145 | abort_ksk_search_task (NULL, tc); | 145 | abort_ksk_search_task (NULL, tc); |
@@ -158,7 +158,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
158 | if (!GNUNET_FS_uri_test_equal | 158 | if (!GNUNET_FS_uri_test_equal |
159 | (sks_expect_uri, event->value.search.specifics.result.uri)) | 159 | (sks_expect_uri, event->value.search.specifics.result.uri)) |
160 | { | 160 | { |
161 | fprintf (stderr, "Wrong result for sks search!\n"); | 161 | FPRINTF (stderr, "%s", "Wrong result for sks search!\n"); |
162 | err = 1; | 162 | err = 1; |
163 | } | 163 | } |
164 | /* give system 1ms to initiate update search! */ | 164 | /* give system 1ms to initiate update search! */ |
@@ -170,7 +170,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
170 | if (!GNUNET_FS_uri_test_equal | 170 | if (!GNUNET_FS_uri_test_equal |
171 | (ksk_expect_uri, event->value.search.specifics.result.uri)) | 171 | (ksk_expect_uri, event->value.search.specifics.result.uri)) |
172 | { | 172 | { |
173 | fprintf (stderr, "Wrong result for ksk search!\n"); | 173 | FPRINTF (stderr, "%s", "Wrong result for ksk search!\n"); |
174 | err = 1; | 174 | err = 1; |
175 | } | 175 | } |
176 | GNUNET_SCHEDULER_add_continuation (&abort_ksk_search_task, NULL, | 176 | GNUNET_SCHEDULER_add_continuation (&abort_ksk_search_task, NULL, |
@@ -178,12 +178,12 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
178 | } | 178 | } |
179 | else | 179 | else |
180 | { | 180 | { |
181 | fprintf (stderr, "Unexpected search result received!\n"); | 181 | FPRINTF (stderr, "%s", "Unexpected search result received!\n"); |
182 | GNUNET_break (0); | 182 | GNUNET_break (0); |
183 | } | 183 | } |
184 | break; | 184 | break; |
185 | case GNUNET_FS_STATUS_SEARCH_ERROR: | 185 | case GNUNET_FS_STATUS_SEARCH_ERROR: |
186 | fprintf (stderr, "Error searching file: %s\n", | 186 | FPRINTF (stderr, "Error searching file: %s\n", |
187 | event->value.search.specifics.error.message); | 187 | event->value.search.specifics.error.message); |
188 | if (sks_search == event->value.search.sc) | 188 | if (sks_search == event->value.search.sc) |
189 | GNUNET_SCHEDULER_add_continuation (&abort_sks_search_task, NULL, | 189 | GNUNET_SCHEDULER_add_continuation (&abort_sks_search_task, NULL, |
@@ -210,7 +210,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
210 | case GNUNET_FS_STATUS_SEARCH_STOPPED: | 210 | case GNUNET_FS_STATUS_SEARCH_STOPPED: |
211 | return NULL; | 211 | return NULL; |
212 | default: | 212 | default: |
213 | fprintf (stderr, "Unexpected event: %d\n", event->status); | 213 | FPRINTF (stderr, "Unexpected event: %d\n", event->status); |
214 | break; | 214 | break; |
215 | } | 215 | } |
216 | return event->value.search.cctx; | 216 | return event->value.search.cctx; |
@@ -227,7 +227,7 @@ publish_cont (void *cls, const struct GNUNET_FS_Uri *ksk_uri, const char *emsg) | |||
227 | 227 | ||
228 | if (NULL != emsg) | 228 | if (NULL != emsg) |
229 | { | 229 | { |
230 | fprintf (stderr, "Error publishing: %s\n", emsg); | 230 | FPRINTF (stderr, "Error publishing: %s\n", emsg); |
231 | err = 1; | 231 | err = 1; |
232 | GNUNET_FS_stop (fs); | 232 | GNUNET_FS_stop (fs); |
233 | return; | 233 | return; |
@@ -237,7 +237,7 @@ publish_cont (void *cls, const struct GNUNET_FS_Uri *ksk_uri, const char *emsg) | |||
237 | sks_uri = GNUNET_FS_uri_parse (sbuf, &msg); | 237 | sks_uri = GNUNET_FS_uri_parse (sbuf, &msg); |
238 | if (msg != NULL) | 238 | if (msg != NULL) |
239 | { | 239 | { |
240 | fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg); | 240 | FPRINTF (stderr, "failed to parse URI `%s': %s\n", sbuf, msg); |
241 | err = 1; | 241 | err = 1; |
242 | GNUNET_FS_stop (fs); | 242 | GNUNET_FS_stop (fs); |
243 | GNUNET_free (msg); | 243 | GNUNET_free (msg); |
@@ -287,7 +287,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) | |||
287 | 287 | ||
288 | if (NULL != emsg) | 288 | if (NULL != emsg) |
289 | { | 289 | { |
290 | fprintf (stderr, "Error publishing: %s\n", emsg); | 290 | FPRINTF (stderr, "Error publishing: %s\n", emsg); |
291 | err = 1; | 291 | err = 1; |
292 | GNUNET_FS_stop (fs); | 292 | GNUNET_FS_stop (fs); |
293 | return; | 293 | return; |
@@ -336,7 +336,7 @@ testNamespace () | |||
336 | GNUNET_FS_namespace_list (fs, &ns_iterator, &ok); | 336 | GNUNET_FS_namespace_list (fs, &ns_iterator, &ok); |
337 | if (GNUNET_NO == ok) | 337 | if (GNUNET_NO == ok) |
338 | { | 338 | { |
339 | fprintf (stderr, "namespace_list failed to find namespace!\n"); | 339 | FPRINTF (stderr, "%s", "namespace_list failed to find namespace!\n"); |
340 | GNUNET_FS_namespace_delete (ns, GNUNET_YES); | 340 | GNUNET_FS_namespace_delete (ns, GNUNET_YES); |
341 | GNUNET_FS_stop (fs); | 341 | GNUNET_FS_stop (fs); |
342 | err = 1; | 342 | err = 1; |
@@ -399,7 +399,7 @@ main (int argc, char *argv[]) | |||
399 | stop_arm (&p1); | 399 | stop_arm (&p1); |
400 | if (GNUNET_YES != update_started) | 400 | if (GNUNET_YES != update_started) |
401 | { | 401 | { |
402 | fprintf (stderr, "Update search never started!\n"); | 402 | FPRINTF (stderr, "%s", "Update search never started!\n"); |
403 | err = 1; | 403 | err = 1; |
404 | } | 404 | } |
405 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-namespace/"); | 405 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-namespace/"); |
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index 81ec3dd7f..051b84f68 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c | |||
@@ -118,12 +118,12 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
118 | break; | 118 | break; |
119 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 119 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
120 | ret = event->value.publish.cctx; | 120 | ret = event->value.publish.cctx; |
121 | fprintf (stderr, "Error publishing file: %s\n", | 121 | FPRINTF (stderr, "Error publishing file: %s\n", |
122 | event->value.publish.specifics.error.message); | 122 | event->value.publish.specifics.error.message); |
123 | err = 1; | 123 | err = 1; |
124 | if (0 == strcmp ("publish-context-dir", event->value.publish.cctx)) | 124 | if (0 == strcmp ("publish-context-dir", event->value.publish.cctx)) |
125 | { | 125 | { |
126 | fprintf (stderr, "Scheduling abort task for error on `%s'\n", | 126 | FPRINTF (stderr, "Scheduling abort task for error on `%s'\n", |
127 | (const char *) event->value.publish.cctx); | 127 | (const char *) event->value.publish.cctx); |
128 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 128 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
129 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 129 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index 145ef0ca9..4d569849f 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c | |||
@@ -184,7 +184,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
184 | break; | 184 | break; |
185 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 185 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
186 | ret = event->value.publish.cctx; | 186 | ret = event->value.publish.cctx; |
187 | fprintf (stderr, "Error publishing file: %s\n", | 187 | FPRINTF (stderr, "Error publishing file: %s\n", |
188 | event->value.publish.specifics.error.message); | 188 | event->value.publish.specifics.error.message); |
189 | err = 1; | 189 | err = 1; |
190 | GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL); | 190 | GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL); |
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c index 9d9825e2f..ffbcd19de 100644 --- a/src/fs/test_fs_search.c +++ b/src/fs/test_fs_search.c | |||
@@ -122,14 +122,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
122 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 122 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
123 | break; | 123 | break; |
124 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 124 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
125 | fprintf (stderr, "Error publishing file: %s\n", | 125 | FPRINTF (stderr, "Error publishing file: %s\n", |
126 | event->value.publish.specifics.error.message); | 126 | event->value.publish.specifics.error.message); |
127 | GNUNET_break (0); | 127 | GNUNET_break (0); |
128 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 128 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
129 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 129 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
130 | break; | 130 | break; |
131 | case GNUNET_FS_STATUS_SEARCH_ERROR: | 131 | case GNUNET_FS_STATUS_SEARCH_ERROR: |
132 | fprintf (stderr, "Error searching file: %s\n", | 132 | FPRINTF (stderr, "Error searching file: %s\n", |
133 | event->value.search.specifics.error.message); | 133 | event->value.search.specifics.error.message); |
134 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, NULL, | 134 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, NULL, |
135 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 135 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -161,7 +161,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
161 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 161 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
162 | break; | 162 | break; |
163 | default: | 163 | default: |
164 | fprintf (stderr, "Unexpected event: %d\n", event->status); | 164 | FPRINTF (stderr, "Unexpected event: %d\n", event->status); |
165 | break; | 165 | break; |
166 | } | 166 | } |
167 | return NULL; | 167 | return NULL; |
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index 74ba9659a..e511b6910 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c | |||
@@ -170,14 +170,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
170 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 170 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
171 | break; | 171 | break; |
172 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 172 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
173 | fprintf (stderr, "Error publishing file: %s\n", | 173 | FPRINTF (stderr, "Error publishing file: %s\n", |
174 | event->value.publish.specifics.error.message); | 174 | event->value.publish.specifics.error.message); |
175 | GNUNET_break (0); | 175 | GNUNET_break (0); |
176 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 176 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
177 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 177 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
178 | break; | 178 | break; |
179 | case GNUNET_FS_STATUS_SEARCH_ERROR: | 179 | case GNUNET_FS_STATUS_SEARCH_ERROR: |
180 | fprintf (stderr, "Error searching file: %s\n", | 180 | FPRINTF (stderr, "Error searching file: %s\n", |
181 | event->value.search.specifics.error.message); | 181 | event->value.search.specifics.error.message); |
182 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, NULL, | 182 | GNUNET_SCHEDULER_add_continuation (&abort_search_task, NULL, |
183 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 183 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -223,7 +223,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
223 | search = NULL; | 223 | search = NULL; |
224 | break; | 224 | break; |
225 | default: | 225 | default: |
226 | fprintf (stderr, "Unexpected event: %d\n", event->status); | 226 | FPRINTF (stderr, "Unexpected event: %d\n", event->status); |
227 | break; | 227 | break; |
228 | } | 228 | } |
229 | return NULL; | 229 | return NULL; |
diff --git a/src/fs/test_fs_search_ranking.c b/src/fs/test_fs_search_ranking.c index 6da936342..383447485 100644 --- a/src/fs/test_fs_search_ranking.c +++ b/src/fs/test_fs_search_ranking.c | |||
@@ -189,7 +189,7 @@ main (int argc, char *argv[]) | |||
189 | prog++; | 189 | prog++; |
190 | if (prog == 10000) | 190 | if (prog == 10000) |
191 | { | 191 | { |
192 | fprintf (stderr, "Upload failed to complete -- last event: %u\n", | 192 | FPRINTF (stderr, "Upload failed to complete -- last event: %u\n", |
193 | lastEvent); | 193 | lastEvent); |
194 | } | 194 | } |
195 | CHECK (prog < 10000); | 195 | CHECK (prog < 10000); |
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index 9b21cd651..14d93fb5e 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c | |||
@@ -135,14 +135,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
135 | #endif | 135 | #endif |
136 | break; | 136 | break; |
137 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 137 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
138 | fprintf (stderr, "Error publishing file: %s\n", | 138 | FPRINTF (stderr, "Error publishing file: %s\n", |
139 | event->value.publish.specifics.error.message); | 139 | event->value.publish.specifics.error.message); |
140 | GNUNET_break (0); | 140 | GNUNET_break (0); |
141 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 141 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
142 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 142 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
143 | break; | 143 | break; |
144 | case GNUNET_FS_STATUS_UNINDEX_ERROR: | 144 | case GNUNET_FS_STATUS_UNINDEX_ERROR: |
145 | fprintf (stderr, "Error unindexing file: %s\n", | 145 | FPRINTF (stderr, "Error unindexing file: %s\n", |
146 | event->value.unindex.specifics.error.message); | 146 | event->value.unindex.specifics.error.message); |
147 | GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL, | 147 | GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL, |
148 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 148 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index 0529aacfa..e5ad9b260 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c | |||
@@ -196,14 +196,14 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event) | |||
196 | unindex = event->value.unindex.uc; | 196 | unindex = event->value.unindex.uc; |
197 | return "unindex"; | 197 | return "unindex"; |
198 | case GNUNET_FS_STATUS_PUBLISH_ERROR: | 198 | case GNUNET_FS_STATUS_PUBLISH_ERROR: |
199 | fprintf (stderr, "Error publishing file: %s\n", | 199 | FPRINTF (stderr, "Error publishing file: %s\n", |
200 | event->value.publish.specifics.error.message); | 200 | event->value.publish.specifics.error.message); |
201 | GNUNET_break (0); | 201 | GNUNET_break (0); |
202 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, | 202 | GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL, |
203 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 203 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
204 | break; | 204 | break; |
205 | case GNUNET_FS_STATUS_UNINDEX_ERROR: | 205 | case GNUNET_FS_STATUS_UNINDEX_ERROR: |
206 | fprintf (stderr, "Error unindexing file: %s\n", | 206 | FPRINTF (stderr, "Error unindexing file: %s\n", |
207 | event->value.unindex.specifics.error.message); | 207 | event->value.unindex.specifics.error.message); |
208 | GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL, | 208 | GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL, |
209 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 209 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_uri.c b/src/fs/test_fs_uri.c index 72744351b..b7a58ec0f 100644 --- a/src/fs/test_fs_uri.c +++ b/src/fs/test_fs_uri.c | |||
@@ -94,7 +94,7 @@ testLocation () | |||
94 | cfg = GNUNET_CONFIGURATION_create (); | 94 | cfg = GNUNET_CONFIGURATION_create (); |
95 | if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, "test_fs_uri_data.conf")) | 95 | if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, "test_fs_uri_data.conf")) |
96 | { | 96 | { |
97 | fprintf (stderr, "Failed to parse configuration file\n"); | 97 | FPRINTF (stderr, "%s", "Failed to parse configuration file\n"); |
98 | GNUNET_FS_uri_destroy (baseURI); | 98 | GNUNET_FS_uri_destroy (baseURI); |
99 | GNUNET_CONFIGURATION_destroy (cfg); | 99 | GNUNET_CONFIGURATION_destroy (cfg); |
100 | return 1; | 100 | return 1; |
@@ -316,11 +316,11 @@ main (int argc, char *argv[]) | |||
316 | failureCount += testLocation (); | 316 | failureCount += testLocation (); |
317 | for (i = 0; i < 255; i++) | 317 | for (i = 0; i < 255; i++) |
318 | { | 318 | { |
319 | /* fprintf (stderr, "."); */ | 319 | /* FPRINTF (stderr, "%s", "."); */ |
320 | failureCount += testNamespace (i); | 320 | failureCount += testNamespace (i); |
321 | failureCount += testFile (i); | 321 | failureCount += testFile (i); |
322 | } | 322 | } |
323 | /* fprintf (stderr, "\n"); */ | 323 | /* FPRINTF (stderr, "%s", "\n"); */ |
324 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-uri"); | 324 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-uri"); |
325 | if (failureCount != 0) | 325 | if (failureCount != 0) |
326 | return 1; | 326 | return 1; |
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index 91caf103f..70fadd8d0 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c | |||
@@ -74,7 +74,7 @@ do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
74 | fancy = | 74 | fancy = |
75 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * | 75 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * |
76 | 1000LL / del.rel_value); | 76 | 1000LL / del.rel_value); |
77 | fprintf (stdout, "Download speed was %s/s\n", fancy); | 77 | FPRINTF (stdout, "Download speed was %s/s\n", fancy); |
78 | GNUNET_free (fancy); | 78 | GNUNET_free (fancy); |
79 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n", | 79 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n", |
80 | (unsigned long long) FILESIZE); | 80 | (unsigned long long) FILESIZE); |
@@ -166,7 +166,7 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
166 | { | 166 | { |
167 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | 167 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
168 | { | 168 | { |
169 | fprintf (stderr, "Daemons failed to start!\n"); | 169 | FPRINTF (stderr, "%s", "Daemons failed to start!\n"); |
170 | GNUNET_break (0); | 170 | GNUNET_break (0); |
171 | ok = 1; | 171 | ok = 1; |
172 | return; | 172 | return; |
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c index 434dd3ce5..fb07d34b5 100644 --- a/src/fs/test_gnunet_service_fs_p2p.c +++ b/src/fs/test_gnunet_service_fs_p2p.c | |||
@@ -70,7 +70,7 @@ do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
70 | fancy = | 70 | fancy = |
71 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * | 71 | GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) * |
72 | 1000LL / del.rel_value); | 72 | 1000LL / del.rel_value); |
73 | fprintf (stdout, "Download speed was %s/s\n", fancy); | 73 | FPRINTF (stdout, "Download speed was %s/s\n", fancy); |
74 | GNUNET_free (fancy); | 74 | GNUNET_free (fancy); |
75 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n", | 75 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n", |
76 | (unsigned long long) FILESIZE); | 76 | (unsigned long long) FILESIZE); |
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c index eb15668f4..c645252ff 100644 --- a/src/hello/test_hello.c +++ b/src/hello/test_hello.c | |||
@@ -38,7 +38,7 @@ my_addr_gen (void *cls, size_t max, void *buf) | |||
38 | struct GNUNET_HELLO_Address address; | 38 | struct GNUNET_HELLO_Address address; |
39 | 39 | ||
40 | #if DEBUG | 40 | #if DEBUG |
41 | fprintf (stderr, "DEBUG: my_addr_gen called with i = %d\n", *i); | 41 | FPRINTF (stderr, "DEBUG: my_addr_gen called with i = %d\n", *i); |
42 | #endif | 42 | #endif |
43 | if (0 == *i) | 43 | if (0 == *i) |
44 | return 0; | 44 | return 0; |
@@ -61,7 +61,7 @@ check_addr (void *cls, const struct GNUNET_HELLO_Address *address, | |||
61 | unsigned int *i = cls; | 61 | unsigned int *i = cls; |
62 | 62 | ||
63 | #if DEBUG | 63 | #if DEBUG |
64 | fprintf (stderr, "DEBUG: check_addr called with i = %d and addrlen = %u\n", | 64 | FPRINTF (stderr, "DEBUG: check_addr called with i = %d and addrlen = %u\n", |
65 | *i, address->address_length); | 65 | *i, address->address_length); |
66 | #endif | 66 | #endif |
67 | GNUNET_assert (address->address_length > 0); | 67 | GNUNET_assert (address->address_length > 0); |
@@ -82,7 +82,7 @@ remove_some (void *cls, const struct GNUNET_HELLO_Address *address, | |||
82 | unsigned int *i = cls; | 82 | unsigned int *i = cls; |
83 | 83 | ||
84 | #if DEBUG | 84 | #if DEBUG |
85 | fprintf (stderr, "DEBUG: remove_some called with i = %d and addrlen = %u\n", | 85 | FPRINTF (stderr, "DEBUG: remove_some called with i = %d and addrlen = %u\n", |
86 | *i, address->address_length); | 86 | *i, address->address_length); |
87 | #endif | 87 | #endif |
88 | GNUNET_assert (address->address_length > 0); | 88 | GNUNET_assert (address->address_length > 0); |
@@ -110,7 +110,7 @@ main (int argc, char *argv[]) | |||
110 | startup_time = GNUNET_TIME_absolute_get (); | 110 | startup_time = GNUNET_TIME_absolute_get (); |
111 | memset (&publicKey, 42, sizeof (publicKey)); | 111 | memset (&publicKey, 42, sizeof (publicKey)); |
112 | #if VERBOSE | 112 | #if VERBOSE |
113 | fprintf (stderr, "Testing HELLO creation (without addresses)...\n"); | 113 | FPRINTF (stderr, "%s", "Testing HELLO creation (without addresses)...\n"); |
114 | #endif | 114 | #endif |
115 | i = 0; | 115 | i = 0; |
116 | msg1 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); | 116 | msg1 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); |
@@ -118,14 +118,14 @@ main (int argc, char *argv[]) | |||
118 | GNUNET_assert (0 < GNUNET_HELLO_size (msg1)); | 118 | GNUNET_assert (0 < GNUNET_HELLO_size (msg1)); |
119 | 119 | ||
120 | #if VERBOSE | 120 | #if VERBOSE |
121 | fprintf (stderr, "Testing address iteration (empty set)...\n"); | 121 | FPRINTF (stderr, "%s", "Testing address iteration (empty set)...\n"); |
122 | #endif | 122 | #endif |
123 | GNUNET_assert (NULL == | 123 | GNUNET_assert (NULL == |
124 | GNUNET_HELLO_iterate_addresses (msg1, GNUNET_NO, &check_addr, | 124 | GNUNET_HELLO_iterate_addresses (msg1, GNUNET_NO, &check_addr, |
125 | &i)); | 125 | &i)); |
126 | 126 | ||
127 | #if VERBOSE | 127 | #if VERBOSE |
128 | fprintf (stderr, "Testing HELLO creation (with one address)...\n"); | 128 | FPRINTF (stderr, "%s", "Testing HELLO creation (with one address)...\n"); |
129 | #endif | 129 | #endif |
130 | i = 1; | 130 | i = 1; |
131 | msg2 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); | 131 | msg2 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); |
@@ -133,7 +133,7 @@ main (int argc, char *argv[]) | |||
133 | GNUNET_assert (GNUNET_HELLO_size (msg1) < GNUNET_HELLO_size (msg2)); | 133 | GNUNET_assert (GNUNET_HELLO_size (msg1) < GNUNET_HELLO_size (msg2)); |
134 | 134 | ||
135 | #if VERBOSE | 135 | #if VERBOSE |
136 | fprintf (stderr, "Testing address iteration (one address)...\n"); | 136 | FPRINTF (stderr, "%s", "Testing address iteration (one address)...\n"); |
137 | #endif | 137 | #endif |
138 | i = 1; | 138 | i = 1; |
139 | GNUNET_assert (NULL == | 139 | GNUNET_assert (NULL == |
@@ -142,14 +142,14 @@ main (int argc, char *argv[]) | |||
142 | GNUNET_assert (i == 0); | 142 | GNUNET_assert (i == 0); |
143 | 143 | ||
144 | #if VERBOSE | 144 | #if VERBOSE |
145 | fprintf (stderr, "Testing get_key from HELLO...\n"); | 145 | FPRINTF (stderr, "%s", "Testing get_key from HELLO...\n"); |
146 | #endif | 146 | #endif |
147 | GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_key (msg2, &pk)); | 147 | GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_key (msg2, &pk)); |
148 | GNUNET_assert (0 == memcmp (&publicKey, &pk, sizeof (pk))); | 148 | GNUNET_assert (0 == memcmp (&publicKey, &pk, sizeof (pk))); |
149 | GNUNET_free (msg1); | 149 | GNUNET_free (msg1); |
150 | 150 | ||
151 | #if VERBOSE | 151 | #if VERBOSE |
152 | fprintf (stderr, "Testing HELLO creation (with two addresses)...\n"); | 152 | FPRINTF (stderr, "%s", "Testing HELLO creation (with two addresses)...\n"); |
153 | #endif | 153 | #endif |
154 | i = 2; | 154 | i = 2; |
155 | msg3 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); | 155 | msg3 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); |
@@ -157,7 +157,7 @@ main (int argc, char *argv[]) | |||
157 | GNUNET_assert (GNUNET_HELLO_size (msg2) < GNUNET_HELLO_size (msg3)); | 157 | GNUNET_assert (GNUNET_HELLO_size (msg2) < GNUNET_HELLO_size (msg3)); |
158 | 158 | ||
159 | #if VERBOSE | 159 | #if VERBOSE |
160 | fprintf (stderr, "Testing address iteration (two addresses)...\n"); | 160 | FPRINTF (stderr, "%s", "Testing address iteration (two addresses)...\n"); |
161 | #endif | 161 | #endif |
162 | i = 3; | 162 | i = 3; |
163 | GNUNET_assert (NULL == | 163 | GNUNET_assert (NULL == |
@@ -166,7 +166,7 @@ main (int argc, char *argv[]) | |||
166 | GNUNET_assert (i == 0); | 166 | GNUNET_assert (i == 0); |
167 | 167 | ||
168 | #if VERBOSE | 168 | #if VERBOSE |
169 | fprintf (stderr, "Testing HELLO merge...\n"); | 169 | FPRINTF (stderr, "%s", "Testing HELLO merge...\n"); |
170 | #endif | 170 | #endif |
171 | msg1 = GNUNET_HELLO_merge (msg2, msg3); | 171 | msg1 = GNUNET_HELLO_merge (msg2, msg3); |
172 | GNUNET_assert (GNUNET_HELLO_size (msg1) == GNUNET_HELLO_size (msg3)); | 172 | GNUNET_assert (GNUNET_HELLO_size (msg1) == GNUNET_HELLO_size (msg3)); |
@@ -179,7 +179,7 @@ main (int argc, char *argv[]) | |||
179 | GNUNET_free (msg1); | 179 | GNUNET_free (msg1); |
180 | 180 | ||
181 | #if VERBOSE | 181 | #if VERBOSE |
182 | fprintf (stderr, "Testing address iteration to copy HELLO...\n"); | 182 | FPRINTF (stderr, "%s", "Testing address iteration to copy HELLO...\n"); |
183 | #endif | 183 | #endif |
184 | i = 2; | 184 | i = 2; |
185 | msg1 = GNUNET_HELLO_iterate_addresses (msg3, GNUNET_YES, &remove_some, &i); | 185 | msg1 = GNUNET_HELLO_iterate_addresses (msg3, GNUNET_YES, &remove_some, &i); |
@@ -193,7 +193,7 @@ main (int argc, char *argv[]) | |||
193 | GNUNET_free (msg1); | 193 | GNUNET_free (msg1); |
194 | 194 | ||
195 | #if VERBOSE | 195 | #if VERBOSE |
196 | fprintf (stderr, "Testing delta address iteration...\n"); | 196 | FPRINTF (stderr, "%s", "Testing delta address iteration...\n"); |
197 | #endif | 197 | #endif |
198 | i = 2; | 198 | i = 2; |
199 | GNUNET_HELLO_iterate_new_addresses (msg3, msg2, startup_time, &check_addr, | 199 | GNUNET_HELLO_iterate_new_addresses (msg3, msg2, startup_time, &check_addr, |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 5dce8df10..92cd7fcc5 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -113,7 +113,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
113 | if (peer == NULL) | 113 | if (peer == NULL) |
114 | return; | 114 | return; |
115 | #if VERBOSE | 115 | #if VERBOSE |
116 | fprintf (stderr, "Peer %s connected\n", GNUNET_i2s (peer)); | 116 | FPRINTF (stderr, "Peer %s connected\n", GNUNET_i2s (peer)); |
117 | #endif | 117 | #endif |
118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n"); | 118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n"); |
119 | ok = 0; | 119 | ok = 0; |
@@ -252,10 +252,10 @@ main (int argc, char *argv[]) | |||
252 | ret = check (); | 252 | ret = check (); |
253 | if (ret == 0) | 253 | if (ret == 0) |
254 | { | 254 | { |
255 | fprintf (stderr, "."); | 255 | FPRINTF (stderr, "%s", "."); |
256 | /* now do it again */ | 256 | /* now do it again */ |
257 | ret = check (); | 257 | ret = check (); |
258 | fprintf (stderr, ".\n"); | 258 | FPRINTF (stderr, "%s", ".\n"); |
259 | } | 259 | } |
260 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); | 260 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); |
261 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); | 261 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); |
diff --git a/src/mesh/mesh_tunnel_tree.c b/src/mesh/mesh_tunnel_tree.c index a7577e36f..445b7100d 100644 --- a/src/mesh/mesh_tunnel_tree.c +++ b/src/mesh/mesh_tunnel_tree.c | |||
@@ -344,25 +344,25 @@ tree_node_debug (struct MeshTunnelTreeNode *n, uint16_t level) | |||
344 | uint16_t i; | 344 | uint16_t i; |
345 | 345 | ||
346 | for (i = 0; i < level; i++) | 346 | for (i = 0; i < level; i++) |
347 | fprintf (stderr, " "); | 347 | FPRINTF (stderr, "%s", " "); |
348 | if (n->status == MESH_PEER_READY) | 348 | if (n->status == MESH_PEER_READY) |
349 | fprintf (stderr, "#"); | 349 | FPRINTF (stderr, "%s", "#"); |
350 | if (n->status == MESH_PEER_SEARCHING) | 350 | if (n->status == MESH_PEER_SEARCHING) |
351 | fprintf (stderr, "+"); | 351 | FPRINTF (stderr, "%s", "+"); |
352 | if (n->status == MESH_PEER_RELAY) | 352 | if (n->status == MESH_PEER_RELAY) |
353 | fprintf (stderr, "-"); | 353 | FPRINTF (stderr, "%s", "-"); |
354 | if (n->status == MESH_PEER_RECONNECTING) | 354 | if (n->status == MESH_PEER_RECONNECTING) |
355 | fprintf (stderr, "*"); | 355 | FPRINTF (stderr, "%s", "*"); |
356 | 356 | ||
357 | GNUNET_PEER_resolve (n->peer, &id); | 357 | GNUNET_PEER_resolve (n->peer, &id); |
358 | fprintf (stderr, "%s, [%u, %p] ", GNUNET_i2s (&id), n->peer, n); | 358 | FPRINTF (stderr, "%s, [%u, %p] ", GNUNET_i2s (&id), n->peer, n); |
359 | if (NULL != n->parent) | 359 | if (NULL != n->parent) |
360 | { | 360 | { |
361 | GNUNET_PEER_resolve (n->parent->peer, &id); | 361 | GNUNET_PEER_resolve (n->parent->peer, &id); |
362 | fprintf (stderr, "(-> %s [%u])\n", GNUNET_i2s (&id), n->parent->peer); | 362 | FPRINTF (stderr, "(-> %s [%u])\n", GNUNET_i2s (&id), n->parent->peer); |
363 | } | 363 | } |
364 | else | 364 | else |
365 | fprintf (stderr, "(root)\n"); | 365 | FPRINTF (stderr, "%s", "(root)\n"); |
366 | for (c = n->children_head; NULL != c; c = c->next) | 366 | for (c = n->children_head; NULL != c; c = c->next) |
367 | tree_node_debug (c, level + 1); | 367 | tree_node_debug (c, level + 1); |
368 | } | 368 | } |
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index 4b7e31ef8..0336ecc9d 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c | |||
@@ -284,7 +284,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
284 | if ((args[0] == NULL) || (1 != SSCANF (args[0], "%u", &port)) || (0 == port) | 284 | if ((args[0] == NULL) || (1 != SSCANF (args[0], "%u", &port)) || (0 == port) |
285 | || (65536 <= port)) | 285 | || (65536 <= port)) |
286 | { | 286 | { |
287 | fprintf (stderr, | 287 | FPRINTF (stderr, |
288 | _ | 288 | _ |
289 | ("Please pass valid port number as the first argument! (got `%s')\n"), | 289 | ("Please pass valid port number as the first argument! (got `%s')\n"), |
290 | args[0]); | 290 | args[0]); |
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c index 801063b23..43743c47b 100644 --- a/src/nse/gnunet-nse-profiler.c +++ b/src/nse/gnunet-nse-profiler.c | |||
@@ -199,7 +199,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
199 | struct NSEPeer *pos; | 199 | struct NSEPeer *pos; |
200 | 200 | ||
201 | #if VERBOSE | 201 | #if VERBOSE |
202 | fprintf (stderr, "Ending test.\n"); | 202 | FPRINTF (stderr, "%s", "Ending test.\n"); |
203 | #endif | 203 | #endif |
204 | 204 | ||
205 | if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 205 | if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -252,7 +252,7 @@ handle_estimate (void *cls, struct GNUNET_TIME_Absolute timestamp, | |||
252 | GNUNET_free (output_buffer); | 252 | GNUNET_free (output_buffer); |
253 | } | 253 | } |
254 | else | 254 | else |
255 | fprintf (stderr, | 255 | FPRINTF (stderr, |
256 | "Received network size estimate from peer %s. Size: %f std.dev. %f\n", | 256 | "Received network size estimate from peer %s. Size: %f std.dev. %f\n", |
257 | GNUNET_i2s (&peer->daemon->id), estimate, std_dev); | 257 | GNUNET_i2s (&peer->daemon->id), estimate, std_dev); |
258 | 258 | ||
diff --git a/src/nse/test_nse_api.c b/src/nse/test_nse_api.c index a2f73aaf4..7e0ab0bbc 100644 --- a/src/nse/test_nse_api.c +++ b/src/nse/test_nse_api.c | |||
@@ -93,7 +93,7 @@ check_nse_message (void *cls, struct GNUNET_TIME_Absolute timestamp, | |||
93 | { | 93 | { |
94 | int *ok = cls; | 94 | int *ok = cls; |
95 | 95 | ||
96 | fprintf (stderr, | 96 | FPRINTF (stderr, |
97 | "Received NSE message, estimate %f, standard deviation %f.\n", | 97 | "Received NSE message, estimate %f, standard deviation %f.\n", |
98 | estimate, std_dev); | 98 | estimate, std_dev); |
99 | /* Fantastic check below. Expect NaN, the only thing not equal to itself. */ | 99 | /* Fantastic check below. Expect NaN, the only thing not equal to itself. */ |
@@ -162,7 +162,7 @@ check () | |||
162 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping arm.\n"); | 162 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping arm.\n"); |
163 | stop_arm (&p1); | 163 | stop_arm (&p1); |
164 | if (0 != ok) | 164 | if (0 != ok) |
165 | fprintf (stderr, "No information received from NSE service!\n"); | 165 | FPRINTF (stderr, "%s", "No information received from NSE service!\n"); |
166 | return ok; | 166 | return ok; |
167 | } | 167 | } |
168 | 168 | ||
diff --git a/src/nse/test_nse_multipeer.c b/src/nse/test_nse_multipeer.c index 435cdabf4..4cd5e4349 100644 --- a/src/nse/test_nse_multipeer.c +++ b/src/nse/test_nse_multipeer.c | |||
@@ -93,7 +93,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
93 | struct NSEPeer *pos; | 93 | struct NSEPeer *pos; |
94 | 94 | ||
95 | #if VERBOSE | 95 | #if VERBOSE |
96 | fprintf (stderr, "Ending test.\n"); | 96 | FPRINTF (stderr, "%s", "Ending test.\n"); |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | while (NULL != (pos = peer_head)) | 99 | while (NULL != (pos = peer_head)) |
@@ -122,7 +122,7 @@ handle_estimate (void *cls, struct GNUNET_TIME_Absolute timestamp, | |||
122 | { | 122 | { |
123 | struct NSEPeer *peer = cls; | 123 | struct NSEPeer *peer = cls; |
124 | 124 | ||
125 | fprintf (stderr, | 125 | FPRINTF (stderr, |
126 | "Received network size estimate from peer %s. logSize: %f std.dev. %f (%f/%u)\n", | 126 | "Received network size estimate from peer %s. logSize: %f std.dev. %f (%f/%u)\n", |
127 | GNUNET_i2s (&peer->daemon->id), estimate, std_dev, | 127 | GNUNET_i2s (&peer->daemon->id), estimate, std_dev, |
128 | GNUNET_NSE_log_estimate_to_n (estimate), num_peers); | 128 | GNUNET_NSE_log_estimate_to_n (estimate), num_peers); |
@@ -136,7 +136,7 @@ connect_nse_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
136 | unsigned int i; | 136 | unsigned int i; |
137 | 137 | ||
138 | #if VERBOSE | 138 | #if VERBOSE |
139 | fprintf (stderr, "TEST_NSE_MULTIPEER: connecting to nse service of peers\n"); | 139 | FPRINTF (stderr, "%s", "TEST_NSE_MULTIPEER: connecting to nse service of peers\n"); |
140 | #endif | 140 | #endif |
141 | for (i = 0; i < num_peers; i++) | 141 | for (i = 0; i < num_peers; i++) |
142 | { | 142 | { |
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index 337a9b2ab..21c996661 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c | |||
@@ -148,7 +148,7 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
148 | if (peer == NULL) | 148 | if (peer == NULL) |
149 | { | 149 | { |
150 | if (err_msg != NULL) | 150 | if (err_msg != NULL) |
151 | fprintf (stderr, _("Error in communication with PEERINFO service\n")); | 151 | FPRINTF (stderr, "%s", _("Error in communication with PEERINFO service\n")); |
152 | GNUNET_PEERINFO_disconnect (peerinfo); | 152 | GNUNET_PEERINFO_disconnect (peerinfo); |
153 | return; | 153 | return; |
154 | } | 154 | } |
@@ -191,7 +191,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
191 | cfg = c; | 191 | cfg = c; |
192 | if (args[0] != NULL) | 192 | if (args[0] != NULL) |
193 | { | 193 | { |
194 | fprintf (stderr, _("Invalid command line argument `%s'\n"), args[0]); | 194 | FPRINTF (stderr, _("Invalid command line argument `%s'\n"), args[0]); |
195 | return; | 195 | return; |
196 | } | 196 | } |
197 | if (get_self != GNUNET_YES) | 197 | if (get_self != GNUNET_YES) |
@@ -199,7 +199,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
199 | peerinfo = GNUNET_PEERINFO_connect (cfg); | 199 | peerinfo = GNUNET_PEERINFO_connect (cfg); |
200 | if (peerinfo == NULL) | 200 | if (peerinfo == NULL) |
201 | { | 201 | { |
202 | fprintf (stderr, _("Could not access PEERINFO service. Exiting.\n")); | 202 | FPRINTF (stderr, "%s", _("Could not access PEERINFO service. Exiting.\n")); |
203 | return; | 203 | return; |
204 | } | 204 | } |
205 | GNUNET_PEERINFO_iterate (peerinfo, NULL, | 205 | GNUNET_PEERINFO_iterate (peerinfo, NULL, |
@@ -213,14 +213,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
213 | GNUNET_CONFIGURATION_get_value_filename (cfg, "GNUNETD", "HOSTKEY", | 213 | GNUNET_CONFIGURATION_get_value_filename (cfg, "GNUNETD", "HOSTKEY", |
214 | &fn)) | 214 | &fn)) |
215 | { | 215 | { |
216 | fprintf (stderr, _("Could not find option `%s:%s' in configuration.\n"), | 216 | FPRINTF (stderr, _("Could not find option `%s:%s' in configuration.\n"), |
217 | "GNUNETD", "HOSTKEYFILE"); | 217 | "GNUNETD", "HOSTKEYFILE"); |
218 | return; | 218 | return; |
219 | } | 219 | } |
220 | priv = GNUNET_CRYPTO_rsa_key_create_from_file (fn); | 220 | priv = GNUNET_CRYPTO_rsa_key_create_from_file (fn); |
221 | if (priv == NULL) | 221 | if (priv == NULL) |
222 | { | 222 | { |
223 | fprintf (stderr, _("Loading hostkey from `%s' failed.\n"), fn); | 223 | FPRINTF (stderr, _("Loading hostkey from `%s' failed.\n"), fn); |
224 | GNUNET_free (fn); | 224 | GNUNET_free (fn); |
225 | return; | 225 | return; |
226 | } | 226 | } |
diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c index 38bbb828f..e69b487d5 100755 --- a/src/peerinfo/perf_peerinfo_api.c +++ b/src/peerinfo/perf_peerinfo_api.c | |||
@@ -56,7 +56,7 @@ check_it (void *cls, const struct GNUNET_HELLO_Address *address, | |||
56 | #if DEBUG | 56 | #if DEBUG |
57 | if (addrlen > 0) | 57 | if (addrlen > 0) |
58 | { | 58 | { |
59 | fprintf (stderr, "name: %s, addr: %s\n", tname, (const char *) addr); | 59 | FPRINTF (stderr, "name: %s, addr: %s\n", tname, (const char *) addr); |
60 | } | 60 | } |
61 | #endif | 61 | #endif |
62 | return GNUNET_OK; | 62 | return GNUNET_OK; |
@@ -110,13 +110,13 @@ process (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
110 | if (peer == NULL) | 110 | if (peer == NULL) |
111 | { | 111 | { |
112 | #if DEBUG | 112 | #if DEBUG |
113 | fprintf (stderr, "Process received NULL response\n"); | 113 | FPRINTF (stderr, "Process received NULL response\n"); |
114 | #endif | 114 | #endif |
115 | } | 115 | } |
116 | else | 116 | else |
117 | { | 117 | { |
118 | #if DEBUG | 118 | #if DEBUG |
119 | fprintf (stderr, "Processed a peer\n"); | 119 | FPRINTF (stderr, "Processed a peer\n"); |
120 | #endif | 120 | #endif |
121 | numpeers++; | 121 | numpeers++; |
122 | if (0 && (hello != NULL)) | 122 | if (0 && (hello != NULL)) |
@@ -179,7 +179,7 @@ check () | |||
179 | GNUNET_assert (NULL != proc); | 179 | GNUNET_assert (NULL != proc); |
180 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, | 180 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, |
181 | "perf-peerinfo-api", "nohelp", options, &run, &ok); | 181 | "perf-peerinfo-api", "nohelp", options, &run, &ok); |
182 | fprintf (stderr, "Received %u/%u calls before timeout\n", numpeers, | 182 | FPRINTF (stderr, "Received %u/%u calls before timeout\n", numpeers, |
183 | NUM_REQUESTS * NUM_REQUESTS / 2); | 183 | NUM_REQUESTS * NUM_REQUESTS / 2); |
184 | GAUGER ("PEERINFO", "Peerinfo lookups", numpeers / 30, "peers/s"); | 184 | GAUGER ("PEERINFO", "Peerinfo lookups", numpeers / 30, "peers/s"); |
185 | #if START_SERVICE | 185 | #if START_SERVICE |
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 0f2c92582..7fe78161c 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -95,7 +95,7 @@ cleanup (void *cls, int success) | |||
95 | 95 | ||
96 | if (success != GNUNET_OK) | 96 | if (success != GNUNET_OK) |
97 | { | 97 | { |
98 | fprintf (stderr, _("Failed to obtain statistics.\n")); | 98 | FPRINTF (stderr, _("Failed to obtain statistics.\n"),NULL); |
99 | ret = 1; | 99 | ret = 1; |
100 | } | 100 | } |
101 | if (h != NULL) | 101 | if (h != NULL) |
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c index e966ca137..2bca7b3b9 100644 --- a/src/testing/test_testing_large_topology.c +++ b/src/testing/test_testing_large_topology.c | |||
@@ -245,7 +245,7 @@ finish_testing () | |||
245 | 245 | ||
246 | if (dotOutFile != NULL) | 246 | if (dotOutFile != NULL) |
247 | { | 247 | { |
248 | fprintf (dotOutFile, "}"); | 248 | FPRINTF (dotOutFile, "%s", "}"); |
249 | fclose (dotOutFile); | 249 | fclose (dotOutFile); |
250 | } | 250 | } |
251 | 251 | ||
@@ -290,19 +290,19 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first, | |||
290 | { | 290 | { |
291 | if (outfile != NULL) | 291 | if (outfile != NULL) |
292 | { | 292 | { |
293 | fprintf (outfile, "\t\"%s\" -- ", GNUNET_i2s (first)); | 293 | FPRINTF (outfile, "\t\"%s\" -- ", GNUNET_i2s (first)); |
294 | fprintf (outfile, "\"%s\";\n", GNUNET_i2s (second)); | 294 | FPRINTF (outfile, "\"%s\";\n", GNUNET_i2s (second)); |
295 | } | 295 | } |
296 | topology_connections++; | 296 | topology_connections++; |
297 | } | 297 | } |
298 | else | 298 | else |
299 | { | 299 | { |
300 | fprintf (stderr, | 300 | FPRINTF (stderr, |
301 | "Finished iterating over topology, %d total connections!\n", | 301 | "Finished iterating over topology, %d total connections!\n", |
302 | topology_connections); | 302 | topology_connections); |
303 | if (outfile != NULL) | 303 | if (outfile != NULL) |
304 | { | 304 | { |
305 | fprintf (outfile, "}\n"); | 305 | FPRINTF (outfile, "%s", "}\n"); |
306 | fclose (outfile); | 306 | fclose (outfile); |
307 | GNUNET_SCHEDULER_add_now (&finish_testing, NULL); | 307 | GNUNET_SCHEDULER_add_now (&finish_testing, NULL); |
308 | } | 308 | } |
@@ -326,16 +326,16 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
326 | if ((total_messages_received) % modnum == 0) | 326 | if ((total_messages_received) % modnum == 0) |
327 | { | 327 | { |
328 | if (total_messages_received == 0) | 328 | if (total_messages_received == 0) |
329 | fprintf (stdout, "0%%"); | 329 | FPRINTF (stdout, "%s", "0%%"); |
330 | else | 330 | else |
331 | fprintf (stdout, "%d%%", | 331 | FPRINTF (stdout, "%d%%", |
332 | (int) (((float) total_messages_received / expected_messages) * | 332 | (int) (((float) total_messages_received / expected_messages) * |
333 | 100)); | 333 | 100)); |
334 | 334 | ||
335 | } | 335 | } |
336 | else if (total_messages_received % dotnum == 0) | 336 | else if (total_messages_received % dotnum == 0) |
337 | { | 337 | { |
338 | fprintf (stdout, "."); | 338 | FPRINTF (stdout, "%s", "."); |
339 | } | 339 | } |
340 | fflush (stdout); | 340 | fflush (stdout); |
341 | #endif | 341 | #endif |
@@ -354,7 +354,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
354 | if (total_messages_received == expected_messages) | 354 | if (total_messages_received == expected_messages) |
355 | { | 355 | { |
356 | #if VERBOSE | 356 | #if VERBOSE |
357 | fprintf (stdout, "100%%]\n"); | 357 | FPRINTF (stdout, "%s", "100%%]\n"); |
358 | #endif | 358 | #endif |
359 | GNUNET_SCHEDULER_cancel (die_task); | 359 | GNUNET_SCHEDULER_cancel (die_task); |
360 | GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology"); | 360 | GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology"); |
@@ -362,7 +362,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
362 | GNUNET_free (dotOutFileNameFinished); | 362 | GNUNET_free (dotOutFileNameFinished); |
363 | if (dotOutFileFinished != NULL) | 363 | if (dotOutFileFinished != NULL) |
364 | { | 364 | { |
365 | fprintf (dotOutFileFinished, "strict graph G {\n"); | 365 | FPRINTF (dotOutFileFinished, "%s", "strict graph G {\n"); |
366 | } | 366 | } |
367 | topology_connections = 0; | 367 | topology_connections = 0; |
368 | GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished); | 368 | GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished); |
@@ -424,7 +424,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
424 | 424 | ||
425 | if (dotOutFile != NULL) | 425 | if (dotOutFile != NULL) |
426 | { | 426 | { |
427 | fprintf (dotOutFile, "}"); | 427 | FPRINTF (dotOutFile, "%s", "}"); |
428 | fclose (dotOutFile); | 428 | fclose (dotOutFile); |
429 | } | 429 | } |
430 | } | 430 | } |
@@ -639,16 +639,16 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
639 | if ((total_connections) % modnum == 0) | 639 | if ((total_connections) % modnum == 0) |
640 | { | 640 | { |
641 | if (total_connections == 0) | 641 | if (total_connections == 0) |
642 | fprintf (stdout, "0%%"); | 642 | FPRINTF (stdout, "%s", "0%%"); |
643 | else | 643 | else |
644 | fprintf (stdout, "%d%%", | 644 | FPRINTF (stdout, "%d%%", |
645 | (int) (((float) total_connections / expected_connections) * | 645 | (int) (((float) total_connections / expected_connections) * |
646 | 100)); | 646 | 100)); |
647 | 647 | ||
648 | } | 648 | } |
649 | else if (total_connections % dotnum == 0) | 649 | else if (total_connections % dotnum == 0) |
650 | { | 650 | { |
651 | fprintf (stdout, "."); | 651 | FPRINTF (stdout, "%s", "."); |
652 | } | 652 | } |
653 | fflush (stdout); | 653 | fflush (stdout); |
654 | #endif | 654 | #endif |
@@ -667,7 +667,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
667 | 667 | ||
668 | expected_messages++; | 668 | expected_messages++; |
669 | if (dotOutFile != NULL) | 669 | if (dotOutFile != NULL) |
670 | fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, | 670 | FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, |
671 | second_daemon->shortname); | 671 | second_daemon->shortname); |
672 | } | 672 | } |
673 | #if VERBOSE | 673 | #if VERBOSE |
@@ -683,7 +683,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
683 | if (total_connections == expected_connections) | 683 | if (total_connections == expected_connections) |
684 | { | 684 | { |
685 | #if VERBOSE | 685 | #if VERBOSE |
686 | fprintf (stdout, "100%%]\n"); | 686 | FPRINTF (stdout, "%s", "100%%]\n"); |
687 | #endif | 687 | #endif |
688 | #if VERBOSE | 688 | #if VERBOSE |
689 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 689 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -695,7 +695,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
695 | GNUNET_SCHEDULER_cancel (die_task); | 695 | GNUNET_SCHEDULER_cancel (die_task); |
696 | die_task = GNUNET_SCHEDULER_NO_TASK; | 696 | die_task = GNUNET_SCHEDULER_NO_TASK; |
697 | #if DELAY_FOR_LOGGING | 697 | #if DELAY_FOR_LOGGING |
698 | fprintf (stdout, "Sending test messages in 10 seconds.\n"); | 698 | FPRINTF (stdout, "%s", "Sending test messages in 10 seconds.\n"); |
699 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 699 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
700 | (GNUNET_TIME_UNIT_SECONDS, 10), | 700 | (GNUNET_TIME_UNIT_SECONDS, 10), |
701 | &send_test_messages, test_messages); | 701 | &send_test_messages, test_messages); |
@@ -709,7 +709,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
709 | test_messages); | 709 | test_messages); |
710 | #endif | 710 | #endif |
711 | #if VERBOSE | 711 | #if VERBOSE |
712 | fprintf (stdout, "Test message progress: ["); | 712 | FPRINTF (stdout, "%s", "Test message progress: ["); |
713 | #endif | 713 | #endif |
714 | 714 | ||
715 | } | 715 | } |
@@ -784,7 +784,7 @@ connect_topology () | |||
784 | modnum = expected_connections / 4; | 784 | modnum = expected_connections / 4; |
785 | dotnum = (expected_connections / 50) + 1; | 785 | dotnum = (expected_connections / 50) + 1; |
786 | #if VERBOSE | 786 | #if VERBOSE |
787 | fprintf (stdout, "Peer connection progress: ["); | 787 | FPRINTF (stdout, "%s", "Peer connection progress: ["); |
788 | #endif | 788 | #endif |
789 | } | 789 | } |
790 | 790 | ||
@@ -798,7 +798,7 @@ create_topology () | |||
798 | #if VERBOSE | 798 | #if VERBOSE |
799 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 799 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
800 | "Topology set up, now starting peers!\n"); | 800 | "Topology set up, now starting peers!\n"); |
801 | fprintf (stdout, "Daemon start progress ["); | 801 | FPRINTF (stdout, "%s", "Daemon start progress ["); |
802 | #endif | 802 | #endif |
803 | GNUNET_TESTING_daemons_continue_startup (pg); | 803 | GNUNET_TESTING_daemons_continue_startup (pg); |
804 | } | 804 | } |
@@ -836,15 +836,15 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
836 | if ((num_peers - peers_left) % modnum == 0) | 836 | if ((num_peers - peers_left) % modnum == 0) |
837 | { | 837 | { |
838 | if (num_peers - peers_left == 0) | 838 | if (num_peers - peers_left == 0) |
839 | fprintf (stdout, "0%%"); | 839 | FPRINTF (stdout, "%s", "0%%"); |
840 | else | 840 | else |
841 | fprintf (stdout, "%d%%", | 841 | FPRINTF (stdout, "%d%%", |
842 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); | 842 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); |
843 | 843 | ||
844 | } | 844 | } |
845 | else if ((num_peers - peers_left) % dotnum == 0) | 845 | else if ((num_peers - peers_left) % dotnum == 0) |
846 | { | 846 | { |
847 | fprintf (stdout, "."); | 847 | FPRINTF (stdout, "%s", "."); |
848 | } | 848 | } |
849 | fflush (stdout); | 849 | fflush (stdout); |
850 | #endif | 850 | #endif |
@@ -852,7 +852,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
852 | if (peers_left == 0) | 852 | if (peers_left == 0) |
853 | { | 853 | { |
854 | #if VERBOSE | 854 | #if VERBOSE |
855 | fprintf (stdout, "100%%]\n"); | 855 | FPRINTF (stdout, "%s", "100%%]\n"); |
856 | #endif | 856 | #endif |
857 | #if VERBOSE | 857 | #if VERBOSE |
858 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 858 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -865,7 +865,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
865 | GNUNET_SCHEDULER_add_delayed (timeout, &end_badly, | 865 | GNUNET_SCHEDULER_add_delayed (timeout, &end_badly, |
866 | "from peers_started_callback"); | 866 | "from peers_started_callback"); |
867 | #if DELAY_FOR_LOGGING | 867 | #if DELAY_FOR_LOGGING |
868 | fprintf (stdout, "Connecting topology in 10 seconds\n"); | 868 | FPRINTF (stdout, "%s", "Connecting topology in 10 seconds\n"); |
869 | gather_log_data (); | 869 | gather_log_data (); |
870 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 870 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
871 | (GNUNET_TIME_UNIT_SECONDS, 10), | 871 | (GNUNET_TIME_UNIT_SECONDS, 10), |
@@ -905,15 +905,15 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
905 | if ((num_peers - peers_left) % modnum == 0) | 905 | if ((num_peers - peers_left) % modnum == 0) |
906 | { | 906 | { |
907 | if (num_peers - peers_left == 0) | 907 | if (num_peers - peers_left == 0) |
908 | fprintf (stdout, "0%%"); | 908 | FPRINTF (stdout, "%s", "0%%"); |
909 | else | 909 | else |
910 | fprintf (stdout, "%d%%", | 910 | FPRINTF (stdout, "%d%%", |
911 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); | 911 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); |
912 | 912 | ||
913 | } | 913 | } |
914 | else if ((num_peers - peers_left) % dotnum == 0) | 914 | else if ((num_peers - peers_left) % dotnum == 0) |
915 | { | 915 | { |
916 | fprintf (stdout, "."); | 916 | FPRINTF (stdout, "%s", "."); |
917 | } | 917 | } |
918 | fflush (stdout); | 918 | fflush (stdout); |
919 | #endif | 919 | #endif |
@@ -921,7 +921,7 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
921 | if (peers_left == 0) | 921 | if (peers_left == 0) |
922 | { | 922 | { |
923 | #if VERBOSE | 923 | #if VERBOSE |
924 | fprintf (stdout, "100%%]\n"); | 924 | FPRINTF (stdout, "%s", "100%%]\n"); |
925 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 925 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
926 | "All %d hostkeys created, now creating topology!\n", num_peers); | 926 | "All %d hostkeys created, now creating topology!\n", num_peers); |
927 | #endif | 927 | #endif |
@@ -952,7 +952,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
952 | dotOutFile = fopen (dotOutFileName, "w"); | 952 | dotOutFile = fopen (dotOutFileName, "w"); |
953 | if (dotOutFile != NULL) | 953 | if (dotOutFile != NULL) |
954 | { | 954 | { |
955 | fprintf (dotOutFile, "strict graph G {\n"); | 955 | FPRINTF (dotOutFile, "%s", "strict graph G {\n"); |
956 | } | 956 | } |
957 | 957 | ||
958 | #if VERBOSE | 958 | #if VERBOSE |
@@ -1101,7 +1101,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1101 | modnum = num_peers / 4; | 1101 | modnum = num_peers / 4; |
1102 | dotnum = (num_peers / 50) + 1; | 1102 | dotnum = (num_peers / 50) + 1; |
1103 | #if VERBOSE | 1103 | #if VERBOSE |
1104 | fprintf (stdout, "Hostkey generation progress: ["); | 1104 | FPRINTF (stdout, "%s", "Hostkey generation progress: ["); |
1105 | #endif | 1105 | #endif |
1106 | /* Set up a task to end testing if peer start fails */ | 1106 | /* Set up a task to end testing if peer start fails */ |
1107 | die_task = | 1107 | die_task = |
diff --git a/src/testing/test_testing_reconnect.c b/src/testing/test_testing_reconnect.c index 20c628c6a..bcee38659 100644 --- a/src/testing/test_testing_reconnect.c +++ b/src/testing/test_testing_reconnect.c | |||
@@ -72,11 +72,11 @@ end2_cb (void *cls, const char *emsg) | |||
72 | { | 72 | { |
73 | if (phase < NUM_PHASES) | 73 | if (phase < NUM_PHASES) |
74 | { | 74 | { |
75 | fprintf (stderr, "."); | 75 | FPRINTF (stderr, "%s", "."); |
76 | run_phase (); | 76 | run_phase (); |
77 | return; | 77 | return; |
78 | } | 78 | } |
79 | fprintf (stderr, ".\n"); | 79 | FPRINTF (stderr, "%s", ".\n"); |
80 | #if VERBOSE | 80 | #if VERBOSE |
81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 81 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
82 | "Both daemons terminated, will now exit.\n"); | 82 | "Both daemons terminated, will now exit.\n"); |
@@ -129,8 +129,8 @@ my_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first, | |||
129 | { | 129 | { |
130 | cc = NULL; | 130 | cc = NULL; |
131 | #if VERBOSE | 131 | #if VERBOSE |
132 | fprintf (stderr, "Peer %s ", GNUNET_i2s (first)); | 132 | FPRINTF (stderr, "Peer %s ", GNUNET_i2s (first)); |
133 | fprintf (stderr, "connected to %s\n", GNUNET_i2s (second)); | 133 | FPRINTF (stderr, "connected to %s\n", GNUNET_i2s (second)); |
134 | #endif | 134 | #endif |
135 | GNUNET_SCHEDULER_add_now (&finish_testing, NULL); | 135 | GNUNET_SCHEDULER_add_now (&finish_testing, NULL); |
136 | } | 136 | } |
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index 7d0c0da5f..17f3be89a 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c | |||
@@ -253,8 +253,8 @@ finish_testing () | |||
253 | 253 | ||
254 | if (dotOutFile != NULL) | 254 | if (dotOutFile != NULL) |
255 | { | 255 | { |
256 | fprintf (dotOutFile, "}"); | 256 | FPRINTF (dotOutFile, "%s", "}"); |
257 | fclose (dotOutFile); | 257 | FCLOSE (dotOutFile); |
258 | } | 258 | } |
259 | 259 | ||
260 | ok = 0; | 260 | ok = 0; |
@@ -326,19 +326,19 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first, | |||
326 | { | 326 | { |
327 | if (outfile != NULL) | 327 | if (outfile != NULL) |
328 | { | 328 | { |
329 | fprintf (outfile, "\t\"%s\" -- ", GNUNET_i2s (first)); | 329 | FPRINTF (outfile, "\t\"%s\" -- ", GNUNET_i2s (first)); |
330 | fprintf (outfile, "\"%s\";\n", GNUNET_i2s (second)); | 330 | FPRINTF (outfile, "\"%s\";\n", GNUNET_i2s (second)); |
331 | } | 331 | } |
332 | topology_connections++; | 332 | topology_connections++; |
333 | } | 333 | } |
334 | else | 334 | else |
335 | { | 335 | { |
336 | fprintf (stderr, | 336 | FPRINTF (stderr, |
337 | "Finished iterating over topology, %d total connections!\n", | 337 | "Finished iterating over topology, %d total connections!\n", |
338 | topology_connections); | 338 | topology_connections); |
339 | if (outfile != NULL) | 339 | if (outfile != NULL) |
340 | { | 340 | { |
341 | fprintf (outfile, "}\n"); | 341 | FPRINTF (outfile, "%s", "}\n"); |
342 | fclose (outfile); | 342 | fclose (outfile); |
343 | #if DO_STATS | 343 | #if DO_STATS |
344 | GNUNET_TESTING_get_statistics (pg, &stats_finished, &stats_print, NULL); | 344 | GNUNET_TESTING_get_statistics (pg, &stats_finished, &stats_print, NULL); |
@@ -366,16 +366,16 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
366 | if ((total_messages_received) % modnum == 0) | 366 | if ((total_messages_received) % modnum == 0) |
367 | { | 367 | { |
368 | if (total_messages_received == 0) | 368 | if (total_messages_received == 0) |
369 | fprintf (stdout, "0%%"); | 369 | FPRINTF (stdout, "%s", "0%%"); |
370 | else | 370 | else |
371 | fprintf (stdout, "%d%%", | 371 | FPRINTF (stdout, "%d%%", |
372 | (int) (((float) total_messages_received / expected_messages) * | 372 | (int) (((float) total_messages_received / expected_messages) * |
373 | 100)); | 373 | 100)); |
374 | 374 | ||
375 | } | 375 | } |
376 | else if (total_messages_received % dotnum == 0) | 376 | else if (total_messages_received % dotnum == 0) |
377 | { | 377 | { |
378 | fprintf (stdout, "."); | 378 | FPRINTF (stdout, "%s", "."); |
379 | } | 379 | } |
380 | fflush (stdout); | 380 | fflush (stdout); |
381 | #endif | 381 | #endif |
@@ -394,7 +394,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
394 | if (total_messages_received == expected_messages) | 394 | if (total_messages_received == expected_messages) |
395 | { | 395 | { |
396 | #if PROGRESS_BARS | 396 | #if PROGRESS_BARS |
397 | fprintf (stdout, "100%%]\n"); | 397 | FPRINTF (stdout, "%s", "100%%]\n"); |
398 | #endif | 398 | #endif |
399 | GNUNET_SCHEDULER_cancel (die_task); | 399 | GNUNET_SCHEDULER_cancel (die_task); |
400 | GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology"); | 400 | GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology"); |
@@ -402,7 +402,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
402 | GNUNET_free (dotOutFileNameFinished); | 402 | GNUNET_free (dotOutFileNameFinished); |
403 | if (dotOutFileFinished != NULL) | 403 | if (dotOutFileFinished != NULL) |
404 | { | 404 | { |
405 | fprintf (dotOutFileFinished, "strict graph G {\n"); | 405 | FPRINTF (dotOutFileFinished, "%s", "strict graph G {\n"); |
406 | } | 406 | } |
407 | topology_connections = 0; | 407 | topology_connections = 0; |
408 | GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished); | 408 | GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished); |
@@ -464,7 +464,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
464 | 464 | ||
465 | if (dotOutFile != NULL) | 465 | if (dotOutFile != NULL) |
466 | { | 466 | { |
467 | fprintf (dotOutFile, "}"); | 467 | FPRINTF (dotOutFile, "%s", "}"); |
468 | fclose (dotOutFile); | 468 | fclose (dotOutFile); |
469 | } | 469 | } |
470 | } | 470 | } |
@@ -680,16 +680,16 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
680 | if ((total_connections) % modnum == 0) | 680 | if ((total_connections) % modnum == 0) |
681 | { | 681 | { |
682 | if (total_connections == 0) | 682 | if (total_connections == 0) |
683 | fprintf (stdout, "0%%"); | 683 | FPRINTF (stdout, "%s", "0%%"); |
684 | else | 684 | else |
685 | fprintf (stdout, "%d%%", | 685 | FPRINTF (stdout, "%d%%", |
686 | (int) (((float) total_connections / expected_connections) * | 686 | (int) (((float) total_connections / expected_connections) * |
687 | 100)); | 687 | 100)); |
688 | 688 | ||
689 | } | 689 | } |
690 | else if (total_connections % dotnum == 0) | 690 | else if (total_connections % dotnum == 0) |
691 | { | 691 | { |
692 | fprintf (stdout, "."); | 692 | FPRINTF (stdout, "%s", "."); |
693 | } | 693 | } |
694 | fflush (stdout); | 694 | fflush (stdout); |
695 | #endif | 695 | #endif |
@@ -708,7 +708,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
708 | 708 | ||
709 | expected_messages++; | 709 | expected_messages++; |
710 | if (dotOutFile != NULL) | 710 | if (dotOutFile != NULL) |
711 | fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, | 711 | FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, |
712 | second_daemon->shortname); | 712 | second_daemon->shortname); |
713 | } | 713 | } |
714 | #if VERBOSE | 714 | #if VERBOSE |
@@ -724,7 +724,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
724 | if (total_connections == expected_connections) | 724 | if (total_connections == expected_connections) |
725 | { | 725 | { |
726 | #if PROGRESS_BARS | 726 | #if PROGRESS_BARS |
727 | fprintf (stdout, "100%%]\n"); | 727 | FPRINTF (stdout, "%s", "100%%]\n"); |
728 | #endif | 728 | #endif |
729 | #if VERBOSE | 729 | #if VERBOSE |
730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -740,7 +740,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
740 | GNUNET_SCHEDULER_cancel (die_task); | 740 | GNUNET_SCHEDULER_cancel (die_task); |
741 | die_task = GNUNET_SCHEDULER_NO_TASK; | 741 | die_task = GNUNET_SCHEDULER_NO_TASK; |
742 | #if DELAY_FOR_LOGGING | 742 | #if DELAY_FOR_LOGGING |
743 | fprintf (stdout, "Sending test messages in 10 seconds.\n"); | 743 | FPRINTF (stdout, "%s", "Sending test messages in 10 seconds.\n"); |
744 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 744 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
745 | (GNUNET_TIME_UNIT_SECONDS, 10), | 745 | (GNUNET_TIME_UNIT_SECONDS, 10), |
746 | &send_test_messages, test_messages); | 746 | &send_test_messages, test_messages); |
@@ -754,7 +754,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
754 | test_messages); | 754 | test_messages); |
755 | #endif | 755 | #endif |
756 | #if PROGRESS_BARS | 756 | #if PROGRESS_BARS |
757 | fprintf (stdout, "Test message progress: ["); | 757 | FPRINTF (stdout, "%s", "Test message progress: ["); |
758 | #endif | 758 | #endif |
759 | 759 | ||
760 | } | 760 | } |
@@ -837,7 +837,7 @@ connect_topology () | |||
837 | if (dotnum == 0) | 837 | if (dotnum == 0) |
838 | dotnum = 1; | 838 | dotnum = 1; |
839 | #if PROGRESS_BARS | 839 | #if PROGRESS_BARS |
840 | fprintf (stdout, "Peer connection progress: ["); | 840 | FPRINTF (stdout, "%s", "Peer connection progress: ["); |
841 | #endif | 841 | #endif |
842 | } | 842 | } |
843 | 843 | ||
@@ -851,7 +851,7 @@ create_topology () | |||
851 | #if PROGRESS_BARS | 851 | #if PROGRESS_BARS |
852 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 852 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
853 | "Topology set up, now starting peers!\n"); | 853 | "Topology set up, now starting peers!\n"); |
854 | fprintf (stdout, "Daemon start progress ["); | 854 | FPRINTF (stdout, "%s", "Daemon start progress ["); |
855 | #endif | 855 | #endif |
856 | GNUNET_TESTING_daemons_continue_startup (pg); | 856 | GNUNET_TESTING_daemons_continue_startup (pg); |
857 | } | 857 | } |
@@ -892,15 +892,15 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
892 | if ((num_peers - peers_left) % modnum == 0) | 892 | if ((num_peers - peers_left) % modnum == 0) |
893 | { | 893 | { |
894 | if (num_peers - peers_left == 0) | 894 | if (num_peers - peers_left == 0) |
895 | fprintf (stdout, "0%%"); | 895 | FPRINTF (stdout, "%s", "0%%"); |
896 | else | 896 | else |
897 | fprintf (stdout, "%d%%", | 897 | FPRINTF (stdout, "%d%%", |
898 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); | 898 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); |
899 | 899 | ||
900 | } | 900 | } |
901 | else if ((num_peers - peers_left) % dotnum == 0) | 901 | else if ((num_peers - peers_left) % dotnum == 0) |
902 | { | 902 | { |
903 | fprintf (stdout, "."); | 903 | FPRINTF (stdout, "%s", "."); |
904 | } | 904 | } |
905 | fflush (stdout); | 905 | fflush (stdout); |
906 | #endif | 906 | #endif |
@@ -908,7 +908,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
908 | if (peers_left == 0) | 908 | if (peers_left == 0) |
909 | { | 909 | { |
910 | #if PROGRESS_BARS | 910 | #if PROGRESS_BARS |
911 | fprintf (stdout, "100%%]\n"); | 911 | FPRINTF (stdout, "%s", "100%%]\n"); |
912 | #endif | 912 | #endif |
913 | #if VERBOSE | 913 | #if VERBOSE |
914 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 914 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -922,7 +922,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
922 | (GNUNET_TIME_UNIT_MINUTES, 8), &end_badly, | 922 | (GNUNET_TIME_UNIT_MINUTES, 8), &end_badly, |
923 | "from peers_started_callback"); | 923 | "from peers_started_callback"); |
924 | #if DELAY_FOR_LOGGING | 924 | #if DELAY_FOR_LOGGING |
925 | fprintf (stdout, "Connecting topology in 10 seconds\n"); | 925 | FPRINTF (stdout, "%s", "Connecting topology in 10 seconds\n"); |
926 | gather_log_data (); | 926 | gather_log_data (); |
927 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 927 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
928 | (GNUNET_TIME_UNIT_SECONDS, 10), | 928 | (GNUNET_TIME_UNIT_SECONDS, 10), |
@@ -962,15 +962,15 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
962 | if ((num_peers - peers_left) % modnum == 0) | 962 | if ((num_peers - peers_left) % modnum == 0) |
963 | { | 963 | { |
964 | if (num_peers - peers_left == 0) | 964 | if (num_peers - peers_left == 0) |
965 | fprintf (stdout, "0%%"); | 965 | FPRINTF (stdout, "%s", "0%%"); |
966 | else | 966 | else |
967 | fprintf (stdout, "%d%%", | 967 | FPRINTF (stdout, "%d%%", |
968 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); | 968 | (int) (((float) (num_peers - peers_left) / num_peers) * 100)); |
969 | 969 | ||
970 | } | 970 | } |
971 | else if ((num_peers - peers_left) % dotnum == 0) | 971 | else if ((num_peers - peers_left) % dotnum == 0) |
972 | { | 972 | { |
973 | fprintf (stdout, "."); | 973 | FPRINTF (stdout, "%s", "."); |
974 | } | 974 | } |
975 | fflush (stdout); | 975 | fflush (stdout); |
976 | #endif | 976 | #endif |
@@ -978,7 +978,7 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
978 | if (peers_left == 0) | 978 | if (peers_left == 0) |
979 | { | 979 | { |
980 | #if PROGRESS_BARS | 980 | #if PROGRESS_BARS |
981 | fprintf (stdout, "100%%]\n"); | 981 | FPRINTF (stdout, "%s", "100%%]\n"); |
982 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 982 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
983 | "All %d hostkeys created, now creating topology!\n", num_peers); | 983 | "All %d hostkeys created, now creating topology!\n", num_peers); |
984 | #endif | 984 | #endif |
@@ -1009,7 +1009,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1009 | dotOutFile = fopen (dotOutFileName, "w"); | 1009 | dotOutFile = fopen (dotOutFileName, "w"); |
1010 | if (dotOutFile != NULL) | 1010 | if (dotOutFile != NULL) |
1011 | { | 1011 | { |
1012 | fprintf (dotOutFile, "strict graph G {\n"); | 1012 | FPRINTF (dotOutFile, "%s", "strict graph G {\n"); |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | #if VERBOSE | 1015 | #if VERBOSE |
@@ -1156,7 +1156,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1156 | if (dotnum == 0) | 1156 | if (dotnum == 0) |
1157 | dotnum = 1; | 1157 | dotnum = 1; |
1158 | #if PROGRESS_BARS | 1158 | #if PROGRESS_BARS |
1159 | fprintf (stdout, "Hostkey generation progress: ["); | 1159 | FPRINTF (stdout, "%s", "Hostkey generation progress: ["); |
1160 | #endif | 1160 | #endif |
1161 | /* Set up a task to end testing if peer start fails */ | 1161 | /* Set up a task to end testing if peer start fails */ |
1162 | die_task = | 1162 | die_task = |
diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c index 095c5b2a2..9ff1fcbaa 100644 --- a/src/testing/test_testing_topology_blacklist.c +++ b/src/testing/test_testing_topology_blacklist.c | |||
@@ -142,7 +142,7 @@ finish_testing () | |||
142 | #endif | 142 | #endif |
143 | if (dotOutFile != NULL) | 143 | if (dotOutFile != NULL) |
144 | { | 144 | { |
145 | fprintf (dotOutFile, "}"); | 145 | FPRINTF (dotOutFile, "%s", "}"); |
146 | fclose (dotOutFile); | 146 | fclose (dotOutFile); |
147 | } | 147 | } |
148 | 148 | ||
@@ -167,7 +167,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
167 | 167 | ||
168 | if (dotOutFile != NULL) | 168 | if (dotOutFile != NULL) |
169 | { | 169 | { |
170 | fprintf (dotOutFile, "}"); | 170 | FPRINTF (dotOutFile, "%s", "}"); |
171 | fclose (dotOutFile); | 171 | fclose (dotOutFile); |
172 | } | 172 | } |
173 | } | 173 | } |
@@ -191,7 +191,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
191 | first_daemon->shortname, second_daemon->shortname); | 191 | first_daemon->shortname, second_daemon->shortname); |
192 | #endif | 192 | #endif |
193 | if (dotOutFile != NULL) | 193 | if (dotOutFile != NULL) |
194 | fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, | 194 | FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, |
195 | second_daemon->shortname); | 195 | second_daemon->shortname); |
196 | } | 196 | } |
197 | 197 | ||
@@ -399,7 +399,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
399 | dotOutFile = fopen (dotOutFileName, "w"); | 399 | dotOutFile = fopen (dotOutFileName, "w"); |
400 | if (dotOutFile != NULL) | 400 | if (dotOutFile != NULL) |
401 | { | 401 | { |
402 | fprintf (dotOutFile, "strict graph G {\n"); | 402 | FPRINTF (dotOutFile, "%s", "strict graph G {\n"); |
403 | } | 403 | } |
404 | 404 | ||
405 | #if VERBOSE | 405 | #if VERBOSE |
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index f56c51381..4f67179c1 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c | |||
@@ -1115,17 +1115,17 @@ update_meter (struct ProgressMeter *meter) | |||
1115 | { | 1115 | { |
1116 | if (meter->completed == 0) | 1116 | if (meter->completed == 0) |
1117 | { | 1117 | { |
1118 | fprintf (stdout, "%sProgress: [0%%", meter->startup_string); | 1118 | FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string); |
1119 | } | 1119 | } |
1120 | else | 1120 | else |
1121 | fprintf (stdout, "%d%%", | 1121 | FPRINTF (stdout, "%d%%", |
1122 | (int) (((float) meter->completed / meter->total) * 100)); | 1122 | (int) (((float) meter->completed / meter->total) * 100)); |
1123 | } | 1123 | } |
1124 | else if (meter->completed % meter->dotnum == 0) | 1124 | else if (meter->completed % meter->dotnum == 0) |
1125 | fprintf (stdout, "."); | 1125 | FPRINTF (stdout, "%s", "."); |
1126 | 1126 | ||
1127 | if (meter->completed + 1 == meter->total) | 1127 | if (meter->completed + 1 == meter->total) |
1128 | fprintf (stdout, "%d%%]\n", 100); | 1128 | FPRINTF (stdout, "%d%%]\n", 100); |
1129 | fflush (stdout); | 1129 | fflush (stdout); |
1130 | } | 1130 | } |
1131 | meter->completed++; | 1131 | meter->completed++; |
@@ -2810,7 +2810,7 @@ friend_file_iterator (void *cls, const GNUNET_HashCode * key, void *value) | |||
2810 | 2810 | ||
2811 | temppeer = &peer->id; | 2811 | temppeer = &peer->id; |
2812 | GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc); | 2812 | GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc); |
2813 | fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc); | 2813 | FPRINTF (temp_friend_handle, "%s\n", (char *) &peer_enc); |
2814 | 2814 | ||
2815 | return GNUNET_YES; | 2815 | return GNUNET_YES; |
2816 | } | 2816 | } |
@@ -2849,7 +2849,7 @@ blacklist_file_iterator (void *cls, const GNUNET_HashCode * key, void *value) | |||
2849 | GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc); | 2849 | GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc); |
2850 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Writing entry %s:%s to file\n", | 2850 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Writing entry %s:%s to file\n", |
2851 | blacklist_ctx->transport, (char *) &peer_enc); | 2851 | blacklist_ctx->transport, (char *) &peer_enc); |
2852 | fprintf (blacklist_ctx->temp_file_handle, "%s:%s\n", blacklist_ctx->transport, | 2852 | FPRINTF (blacklist_ctx->temp_file_handle, "%s:%s\n", blacklist_ctx->transport, |
2853 | (char *) &peer_enc); | 2853 | (char *) &peer_enc); |
2854 | 2854 | ||
2855 | return GNUNET_YES; | 2855 | return GNUNET_YES; |
@@ -2899,7 +2899,7 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg) | |||
2899 | { | 2899 | { |
2900 | GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon-> | 2900 | GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon-> |
2901 | id.hashPubKey, &peer_enc); | 2901 | id.hashPubKey, &peer_enc); |
2902 | fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc); | 2902 | FPRINTF (temp_friend_handle, "%s\n", (char *) &peer_enc); |
2903 | conn_iter = conn_iter->next; | 2903 | conn_iter = conn_iter->next; |
2904 | } | 2904 | } |
2905 | #else | 2905 | #else |
@@ -3086,7 +3086,7 @@ create_and_copy_blacklist_files (struct GNUNET_TESTING_PeerGroup *pg, | |||
3086 | { | 3086 | { |
3087 | GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon-> | 3087 | GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon-> |
3088 | id.hashPubKey, &peer_enc); | 3088 | id.hashPubKey, &peer_enc); |
3089 | fprintf (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc); | 3089 | FPRINTF (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc); |
3090 | conn_iter = conn_iter->next; | 3090 | conn_iter = conn_iter->next; |
3091 | } | 3091 | } |
3092 | #else | 3092 | #else |
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c index bf69a7fc8..a34cb5abe 100644 --- a/src/testing/testing_peergroup.c +++ b/src/testing/testing_peergroup.c | |||
@@ -210,17 +210,17 @@ update_meter (struct ProgressMeter *meter) | |||
210 | { | 210 | { |
211 | if (meter->completed == 0) | 211 | if (meter->completed == 0) |
212 | { | 212 | { |
213 | fprintf (stdout, "%sProgress: [0%%", meter->startup_string); | 213 | FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string); |
214 | } | 214 | } |
215 | else | 215 | else |
216 | fprintf (stdout, "%d%%", | 216 | FPRINTF (stdout, "%d%%", |
217 | (int) (((float) meter->completed / meter->total) * 100)); | 217 | (int) (((float) meter->completed / meter->total) * 100)); |
218 | } | 218 | } |
219 | else if (meter->completed % meter->dotnum == 0) | 219 | else if (meter->completed % meter->dotnum == 0) |
220 | fprintf (stdout, "."); | 220 | FPRINTF (stdout, "%s", "."); |
221 | 221 | ||
222 | if (meter->completed + 1 == meter->total) | 222 | if (meter->completed + 1 == meter->total) |
223 | fprintf (stdout, "%d%%]\n", 100); | 223 | FPRINTF (stdout, "%d%%]\n", 100); |
224 | fflush (stdout); | 224 | fflush (stdout); |
225 | } | 225 | } |
226 | meter->completed++; | 226 | meter->completed++; |
diff --git a/src/topology/test_gnunet_daemon_topology.c b/src/topology/test_gnunet_daemon_topology.c index 9d8f1633d..65a313d44 100644 --- a/src/topology/test_gnunet_daemon_topology.c +++ b/src/topology/test_gnunet_daemon_topology.c | |||
@@ -110,7 +110,7 @@ notify_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first, | |||
110 | *cc = NULL; | 110 | *cc = NULL; |
111 | if (NULL != emsg) | 111 | if (NULL != emsg) |
112 | { | 112 | { |
113 | fprintf (stderr, "Failed to connect two peers: %s\n", emsg); | 113 | FPRINTF (stderr, "Failed to connect two peers: %s\n", emsg); |
114 | for (i = 0; i < NUM_PEERS; i++) | 114 | for (i = 0; i < NUM_PEERS; i++) |
115 | if (NULL != cc[i]) | 115 | if (NULL != cc[i]) |
116 | { | 116 | { |
diff --git a/src/transport/gnunet-transport-connect-running-peers.c b/src/transport/gnunet-transport-connect-running-peers.c index 172f34b27..8ba81891f 100644 --- a/src/transport/gnunet-transport-connect-running-peers.c +++ b/src/transport/gnunet-transport-connect-running-peers.c | |||
@@ -73,7 +73,7 @@ char *cfg_file_p1; | |||
73 | char *cfg_file_p2; | 73 | char *cfg_file_p2; |
74 | 74 | ||
75 | #if VERBOSE | 75 | #if VERBOSE |
76 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 76 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
77 | #else | 77 | #else |
78 | #define OKPP do { ok++; } while (0) | 78 | #define OKPP do { ok++; } while (0) |
79 | #endif | 79 | #endif |
@@ -368,7 +368,7 @@ main (int argc, char *argv[]) | |||
368 | 368 | ||
369 | if (argc < 3) | 369 | if (argc < 3) |
370 | { | 370 | { |
371 | fprintf (stderr, | 371 | FPRINTF (stderr, |
372 | "usage gnunet-transport-connect-running-peers <cfg_peer1> <cfg_peer2>\n"); | 372 | "usage gnunet-transport-connect-running-peers <cfg_peer1> <cfg_peer2>\n"); |
373 | return -1; | 373 | return -1; |
374 | } | 374 | } |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 02a5ee492..17a21dd28 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -167,11 +167,11 @@ display_test_result (struct TestContext *tc, int result) | |||
167 | { | 167 | { |
168 | if (GNUNET_YES != result) | 168 | if (GNUNET_YES != result) |
169 | { | 169 | { |
170 | fprintf (stderr, "Configuration for plugin `%s' did not work!\n", tc->name); | 170 | FPRINTF (stderr, "Configuration for plugin `%s' did not work!\n", tc->name); |
171 | } | 171 | } |
172 | else | 172 | else |
173 | { | 173 | { |
174 | fprintf (stderr, "Configuration for plugin `%s' is working!\n", tc->name); | 174 | FPRINTF (stderr, "Configuration for plugin `%s' is working!\n", tc->name); |
175 | } | 175 | } |
176 | if (GNUNET_SCHEDULER_NO_TASK != tc->tsk) | 176 | if (GNUNET_SCHEDULER_NO_TASK != tc->tsk) |
177 | { | 177 | { |
@@ -245,9 +245,9 @@ do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
245 | GNUNET_CONFIGURATION_get_value_string (cfg, "transport", "plugins", | 245 | GNUNET_CONFIGURATION_get_value_string (cfg, "transport", "plugins", |
246 | &plugins)) | 246 | &plugins)) |
247 | { | 247 | { |
248 | fprintf (stderr, | 248 | FPRINTF (stderr, |
249 | _ | 249 | _ |
250 | ("No transport plugins configured, peer will never communicate\n")); | 250 | ("No transport plugins configured, peer will never communicate\n"), NULL); |
251 | ret = 4; | 251 | ret = 4; |
252 | return; | 252 | return; |
253 | } | 253 | } |
@@ -259,7 +259,7 @@ do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
259 | if (GNUNET_OK != | 259 | if (GNUNET_OK != |
260 | GNUNET_CONFIGURATION_get_value_number (cfg, section, "PORT", &bnd_port)) | 260 | GNUNET_CONFIGURATION_get_value_number (cfg, section, "PORT", &bnd_port)) |
261 | { | 261 | { |
262 | fprintf (stderr, | 262 | FPRINTF (stderr, |
263 | _("No port configured for plugin `%s', cannot test it\n"), tok); | 263 | _("No port configured for plugin `%s', cannot test it\n"), tok); |
264 | continue; | 264 | continue; |
265 | } | 265 | } |
@@ -310,14 +310,14 @@ do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
310 | if (benchmark_receive) | 310 | if (benchmark_receive) |
311 | { | 311 | { |
312 | duration = GNUNET_TIME_absolute_get_duration (start_time); | 312 | duration = GNUNET_TIME_absolute_get_duration (start_time); |
313 | fprintf (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"), | 313 | FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %llu ms)\n"), |
314 | 1000 * traffic_received / (1 + duration.rel_value), | 314 | 1000 * traffic_received / (1 + duration.rel_value), |
315 | traffic_received, (unsigned long long) duration.rel_value); | 315 | traffic_received, (unsigned long long) duration.rel_value); |
316 | } | 316 | } |
317 | if (benchmark_send) | 317 | if (benchmark_send) |
318 | { | 318 | { |
319 | duration = GNUNET_TIME_absolute_get_duration (start_time); | 319 | duration = GNUNET_TIME_absolute_get_duration (start_time); |
320 | fprintf (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"), | 320 | FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %llu ms)\n"), |
321 | 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent, | 321 | 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent, |
322 | (unsigned long long) duration.rel_value); | 322 | (unsigned long long) duration.rel_value); |
323 | } | 323 | } |
@@ -350,7 +350,7 @@ transmit_data (void *cls, size_t size, void *buf) | |||
350 | GNUNET_TIME_UNIT_FOREVER_REL, | 350 | GNUNET_TIME_UNIT_FOREVER_REL, |
351 | &transmit_data, NULL); | 351 | &transmit_data, NULL); |
352 | if (verbosity > 0) | 352 | if (verbosity > 0) |
353 | fprintf (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size, | 353 | FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size, |
354 | GNUNET_i2s (&pid)); | 354 | GNUNET_i2s (&pid)); |
355 | return size; | 355 | return size; |
356 | } | 356 | } |
@@ -370,7 +370,7 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
370 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) | 370 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) |
371 | { | 371 | { |
372 | if (verbosity > 0) | 372 | if (verbosity > 0) |
373 | fprintf (stdout, _("Connected to %s\n"), GNUNET_i2s (peer)); | 373 | FPRINTF (stdout, _("Connected to %s\n"), GNUNET_i2s (peer)); |
374 | if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) | 374 | if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) |
375 | return; | 375 | return; |
376 | ret = 0; | 376 | ret = 0; |
@@ -401,7 +401,7 @@ static void | |||
401 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | 401 | notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) |
402 | { | 402 | { |
403 | if (verbosity > 0) | 403 | if (verbosity > 0) |
404 | fprintf (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer)); | 404 | FPRINTF (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer)); |
405 | if ((0 == memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) && | 405 | if ((0 == memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity))) && |
406 | (NULL != th)) | 406 | (NULL != th)) |
407 | { | 407 | { |
@@ -430,7 +430,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
430 | if (!benchmark_receive) | 430 | if (!benchmark_receive) |
431 | return; | 431 | return; |
432 | if (verbosity > 0) | 432 | if (verbosity > 0) |
433 | fprintf (stdout, _("Received %u bytes from %s\n"), | 433 | FPRINTF (stdout, _("Received %u bytes from %s\n"), |
434 | (unsigned int) ntohs (message->size), GNUNET_i2s (peer)); | 434 | (unsigned int) ntohs (message->size), GNUNET_i2s (peer)); |
435 | if (traffic_received == 0) | 435 | if (traffic_received == 0) |
436 | start_time = GNUNET_TIME_absolute_get (); | 436 | start_time = GNUNET_TIME_absolute_get (); |
@@ -444,7 +444,7 @@ process_string (void *cls, const char *address) | |||
444 | 444 | ||
445 | if ((address != NULL)) | 445 | if ((address != NULL)) |
446 | { | 446 | { |
447 | fprintf (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address); | 447 | FPRINTF (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address); |
448 | } | 448 | } |
449 | else | 449 | else |
450 | { | 450 | { |
@@ -499,7 +499,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
499 | } | 499 | } |
500 | if (benchmark_send && (NULL == cpid)) | 500 | if (benchmark_send && (NULL == cpid)) |
501 | { | 501 | { |
502 | fprintf (stderr, _("Option `%s' makes no sense without option `%s'.\n"), | 502 | FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"), |
503 | "-s", "-C"); | 503 | "-s", "-C"); |
504 | return; | 504 | return; |
505 | } | 505 | } |
@@ -508,7 +508,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
508 | ret = 1; | 508 | ret = 1; |
509 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (cpid, &pid.hashPubKey)) | 509 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (cpid, &pid.hashPubKey)) |
510 | { | 510 | { |
511 | fprintf (stderr, _("Failed to parse peer identity `%s'\n"), cpid); | 511 | FPRINTF (stderr, _("Failed to parse peer identity `%s'\n"), cpid); |
512 | return; | 512 | return; |
513 | } | 513 | } |
514 | handle = | 514 | handle = |
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index 5d9cfff19..0ef708b62 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -130,7 +130,7 @@ static struct GNUNET_TIME_Absolute start_time; | |||
130 | */ | 130 | */ |
131 | 131 | ||
132 | #if VERBOSE | 132 | #if VERBOSE |
133 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 133 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
134 | #else | 134 | #else |
135 | #define OKPP do { ok++; } while (0) | 135 | #define OKPP do { ok++; } while (0) |
136 | #endif | 136 | #endif |
@@ -147,7 +147,7 @@ end () | |||
147 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; | 147 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; |
148 | datarate = (total_bytes_sent * 1000) / delta; | 148 | datarate = (total_bytes_sent * 1000) / delta; |
149 | 149 | ||
150 | fprintf (stderr, "Throughput was %llu b/s\n", datarate); | 150 | FPRINTF (stderr, "Throughput was %llu b/s\n", datarate); |
151 | 151 | ||
152 | test_failed = GNUNET_NO; | 152 | test_failed = GNUNET_NO; |
153 | if (datarate > quota_in_p2) | 153 | if (datarate > quota_in_p2) |
@@ -365,7 +365,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
365 | total_bytes_sent += ret; | 365 | total_bytes_sent += ret; |
366 | if (n == TOTAL_MSGS) | 366 | if (n == TOTAL_MSGS) |
367 | { | 367 | { |
368 | fprintf (stderr, "\n"); | 368 | FPRINTF (stderr, "%s", "\n"); |
369 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages sent\n"); | 369 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages sent\n"); |
370 | } | 370 | } |
371 | return ret; | 371 | return ret; |
@@ -417,12 +417,12 @@ measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
417 | counter++; | 417 | counter++; |
418 | if ((DURATION.rel_value / 1000) < counter) | 418 | if ((DURATION.rel_value / 1000) < counter) |
419 | { | 419 | { |
420 | fprintf (stderr, ".\n"); | 420 | FPRINTF (stderr, "%s", ".\n"); |
421 | GNUNET_SCHEDULER_add_now (&end, NULL); | 421 | GNUNET_SCHEDULER_add_now (&end, NULL); |
422 | } | 422 | } |
423 | else | 423 | else |
424 | { | 424 | { |
425 | fprintf (stderr, "."); | 425 | FPRINTF (stderr, "%s", "."); |
426 | measure_task = | 426 | measure_task = |
427 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &measure, NULL); | 427 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &measure, NULL); |
428 | } | 428 | } |
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index dd0704231..1058f2b6b 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -81,7 +81,7 @@ char *cfg_file_p1; | |||
81 | char *cfg_file_p2; | 81 | char *cfg_file_p2; |
82 | 82 | ||
83 | #if VERBOSE | 83 | #if VERBOSE |
84 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 84 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
85 | #else | 85 | #else |
86 | #define OKPP do { ok++; } while (0) | 86 | #define OKPP do { ok++; } while (0) |
87 | #endif | 87 | #endif |
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c index 20005deab..b4a3ca41d 100644 --- a/src/transport/test_transport_api_bidirectional_connect.c +++ b/src/transport/test_transport_api_bidirectional_connect.c | |||
@@ -80,7 +80,7 @@ char *cfg_file_p1; | |||
80 | char *cfg_file_p2; | 80 | char *cfg_file_p2; |
81 | 81 | ||
82 | #if VERBOSE | 82 | #if VERBOSE |
83 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 83 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
84 | #else | 84 | #else |
85 | #define OKPP do { ok++; } while (0) | 85 | #define OKPP do { ok++; } while (0) |
86 | #endif | 86 | #endif |
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c index 026ed085a..1a73bcb5f 100644 --- a/src/transport/test_transport_api_disconnect.c +++ b/src/transport/test_transport_api_disconnect.c | |||
@@ -80,7 +80,7 @@ char *cfg_file_p1; | |||
80 | char *cfg_file_p2; | 80 | char *cfg_file_p2; |
81 | 81 | ||
82 | #if VERBOSE | 82 | #if VERBOSE |
83 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 83 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
84 | #else | 84 | #else |
85 | #define OKPP do { ok++; } while (0) | 85 | #define OKPP do { ok++; } while (0) |
86 | #endif | 86 | #endif |
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c index 7fb13e261..d1aa6e40d 100644 --- a/src/transport/test_transport_api_limited_sockets.c +++ b/src/transport/test_transport_api_limited_sockets.c | |||
@@ -84,7 +84,7 @@ char *cfg_file_p1; | |||
84 | char *cfg_file_p2; | 84 | char *cfg_file_p2; |
85 | 85 | ||
86 | #if VERBOSE | 86 | #if VERBOSE |
87 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 87 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
88 | #else | 88 | #else |
89 | #define OKPP do { ok++; } while (0) | 89 | #define OKPP do { ok++; } while (0) |
90 | #endif | 90 | #endif |
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index ac360a3ea..eb03564d5 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -123,7 +123,7 @@ static struct GNUNET_TIME_Absolute start_time; | |||
123 | */ | 123 | */ |
124 | 124 | ||
125 | #if VERBOSE | 125 | #if VERBOSE |
126 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 126 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
127 | #else | 127 | #else |
128 | #define OKPP do { ok++; } while (0) | 128 | #define OKPP do { ok++; } while (0) |
129 | #endif | 129 | #endif |
@@ -139,7 +139,7 @@ end () | |||
139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
140 | 140 | ||
141 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; | 141 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; |
142 | fprintf (stderr, "\nThroughput was %llu kb/s\n", | 142 | FPRINTF (stderr, "\nThroughput was %llu kb/s\n", |
143 | total_bytes * 1000 / 1024 / delta); | 143 | total_bytes * 1000 / 1024 / delta); |
144 | GNUNET_asprintf (&value_name, "reliable_%s", test_plugin); | 144 | GNUNET_asprintf (&value_name, "reliable_%s", test_plugin); |
145 | GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta), | 145 | GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta), |
@@ -267,7 +267,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
267 | n++; | 267 | n++; |
268 | if (0 == (n % (TOTAL_MSGS / 100))) | 268 | if (0 == (n % (TOTAL_MSGS / 100))) |
269 | { | 269 | { |
270 | fprintf (stderr, "."); | 270 | FPRINTF (stderr, "%s", "."); |
271 | if (die_task != GNUNET_SCHEDULER_NO_TASK) | 271 | if (die_task != GNUNET_SCHEDULER_NO_TASK) |
272 | GNUNET_SCHEDULER_cancel (die_task); | 272 | GNUNET_SCHEDULER_cancel (die_task); |
273 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 273 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
@@ -353,7 +353,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
353 | total_bytes += ret; | 353 | total_bytes += ret; |
354 | if (n == TOTAL_MSGS) | 354 | if (n == TOTAL_MSGS) |
355 | { | 355 | { |
356 | fprintf (stderr, "\n"); | 356 | FPRINTF (stderr, "%s", "\n"); |
357 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages sent\n"); | 357 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages sent\n"); |
358 | } | 358 | } |
359 | return ret; | 359 | return ret; |
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c index 61423a7ee..22c603565 100644 --- a/src/transport/test_transport_api_restart_1peer.c +++ b/src/transport/test_transport_api_restart_1peer.c | |||
@@ -80,7 +80,7 @@ char *cfg_file_p2; | |||
80 | static int restarted; | 80 | static int restarted; |
81 | 81 | ||
82 | #if VERBOSE | 82 | #if VERBOSE |
83 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 83 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
84 | #else | 84 | #else |
85 | #define OKPP do { ok++; } while (0) | 85 | #define OKPP do { ok++; } while (0) |
86 | #endif | 86 | #endif |
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c index 67cc90f0e..3de91d62a 100644 --- a/src/transport/test_transport_api_restart_2peers.c +++ b/src/transport/test_transport_api_restart_2peers.c | |||
@@ -80,7 +80,7 @@ char *cfg_file_p2; | |||
80 | static int restarted; | 80 | static int restarted; |
81 | 81 | ||
82 | #if VERBOSE | 82 | #if VERBOSE |
83 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 83 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
84 | #else | 84 | #else |
85 | #define OKPP do { ok++; } while (0) | 85 | #define OKPP do { ok++; } while (0) |
86 | #endif | 86 | #endif |
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c index 29f7dd4af..35279ff76 100644 --- a/src/transport/test_transport_api_timeout.c +++ b/src/transport/test_transport_api_timeout.c | |||
@@ -87,7 +87,7 @@ static int disconnects; | |||
87 | 87 | ||
88 | 88 | ||
89 | #if VERBOSE | 89 | #if VERBOSE |
90 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 90 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
91 | #else | 91 | #else |
92 | #define OKPP do { ok++; } while (0) | 92 | #define OKPP do { ok++; } while (0) |
93 | #endif | 93 | #endif |
@@ -210,13 +210,13 @@ timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
210 | if (time_running.rel_value == | 210 | if (time_running.rel_value == |
211 | GNUNET_TIME_relative_max (time_running, WAIT).rel_value) | 211 | GNUNET_TIME_relative_max (time_running, WAIT).rel_value) |
212 | { | 212 | { |
213 | fprintf (stderr, "100%%\n"); | 213 | FPRINTF (stderr, "%s", "100%%\n"); |
214 | shutdown_flag = GNUNET_YES; | 214 | shutdown_flag = GNUNET_YES; |
215 | GNUNET_SCHEDULER_add_now (&end, NULL); | 215 | GNUNET_SCHEDULER_add_now (&end, NULL); |
216 | } | 216 | } |
217 | else | 217 | else |
218 | { | 218 | { |
219 | fprintf (stderr, "%u%%..", percentage); | 219 | FPRINTF (stderr, "%u%%..", percentage); |
220 | timer_task = | 220 | timer_task = |
221 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide (WAIT, 10), | 221 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide (WAIT, 10), |
222 | &timer, NULL); | 222 | &timer, NULL); |
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c index 2120f7044..413daabc9 100644 --- a/src/transport/test_transport_api_unreliability.c +++ b/src/transport/test_transport_api_unreliability.c | |||
@@ -126,7 +126,7 @@ static GNUNET_TRANSPORT_TESTING_ConnectRequest cc; | |||
126 | */ | 126 | */ |
127 | 127 | ||
128 | #if VERBOSE | 128 | #if VERBOSE |
129 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 129 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
130 | #else | 130 | #else |
131 | #define OKPP do { ok++; } while (0) | 131 | #define OKPP do { ok++; } while (0) |
132 | #endif | 132 | #endif |
@@ -144,7 +144,7 @@ end () | |||
144 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 144 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
145 | 145 | ||
146 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; | 146 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; |
147 | fprintf (stderr, "\nThroughput was %llu kb/s\n", | 147 | FPRINTF (stderr, "\nThroughput was %llu kb/s\n", |
148 | total_bytes * 1000 / 1024 / delta); | 148 | total_bytes * 1000 / 1024 / delta); |
149 | GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin); | 149 | GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin); |
150 | GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta), | 150 | GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta), |
@@ -337,7 +337,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
337 | test_sending = GNUNET_YES; | 337 | test_sending = GNUNET_YES; |
338 | if (0 == (n % (TOTAL_MSGS / 100))) | 338 | if (0 == (n % (TOTAL_MSGS / 100))) |
339 | { | 339 | { |
340 | fprintf (stderr, "."); | 340 | FPRINTF (stderr, "%s", "."); |
341 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 341 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
342 | GNUNET_SCHEDULER_cancel (die_task); | 342 | GNUNET_SCHEDULER_cancel (die_task); |
343 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 343 | die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
@@ -410,7 +410,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
410 | } | 410 | } |
411 | else | 411 | else |
412 | { | 412 | { |
413 | fprintf (stderr, "\n"); | 413 | FPRINTF (stderr, "%s", "\n"); |
414 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages scheduled to be sent\n"); | 414 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All messages scheduled to be sent\n"); |
415 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 415 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
416 | GNUNET_SCHEDULER_cancel (die_task); | 416 | GNUNET_SCHEDULER_cancel (die_task); |
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c index 3770ebfdb..52bf63833 100644 --- a/src/transport/test_transport_api_unreliability_constant.c +++ b/src/transport/test_transport_api_unreliability_constant.c | |||
@@ -124,7 +124,7 @@ static struct GNUNET_TIME_Absolute start_time; | |||
124 | */ | 124 | */ |
125 | 125 | ||
126 | #if VERBOSE | 126 | #if VERBOSE |
127 | #define OKPP do { ok++; fprintf (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 127 | #define OKPP do { ok++; FPRINTF (stderr, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
128 | #else | 128 | #else |
129 | #define OKPP do { ok++; } while (0) | 129 | #define OKPP do { ok++; } while (0) |
130 | #endif | 130 | #endif |
@@ -142,7 +142,7 @@ end () | |||
142 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); | 142 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n"); |
143 | 143 | ||
144 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; | 144 | delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value; |
145 | fprintf (stderr, "\nThroughput was %llu kb/s\n", | 145 | FPRINTF (stderr, "\nThroughput was %llu kb/s\n", |
146 | total_bytes * 1000 / 1024 / delta); | 146 | total_bytes * 1000 / 1024 / delta); |
147 | GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin); | 147 | GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin); |
148 | GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta), | 148 | GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta), |
@@ -281,7 +281,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
281 | n++; | 281 | n++; |
282 | if (0 == (n % (TOTAL_MSGS / 100))) | 282 | if (0 == (n % (TOTAL_MSGS / 100))) |
283 | { | 283 | { |
284 | fprintf (stderr, "."); | 284 | FPRINTF (stderr, "%s", "."); |
285 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 285 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
286 | GNUNET_SCHEDULER_cancel (die_task); | 286 | GNUNET_SCHEDULER_cancel (die_task); |
287 | test_failed = GNUNET_YES; | 287 | test_failed = GNUNET_YES; |
@@ -291,7 +291,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
291 | { | 291 | { |
292 | /* because of starting with 0 */ | 292 | /* because of starting with 0 */ |
293 | msg_recv++; | 293 | msg_recv++; |
294 | fprintf (stderr, "\n"); | 294 | FPRINTF (stderr, "%s", "\n"); |
295 | end (); | 295 | end (); |
296 | } | 296 | } |
297 | } | 297 | } |
@@ -356,7 +356,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
356 | } | 356 | } |
357 | else | 357 | else |
358 | { | 358 | { |
359 | fprintf (stderr, "\n"); | 359 | FPRINTF (stderr, "%s", "\n"); |
360 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 360 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
361 | "All messages scheduled to be sent!!\n"); | 361 | "All messages scheduled to be sent!!\n"); |
362 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 362 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index c6215c9bc..36d9b18d3 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c | |||
@@ -124,7 +124,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
124 | timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 124 | timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
125 | 125 | ||
126 | i = 1; | 126 | i = 1; |
127 | fprintf (stderr, "%i", i); | 127 | FPRINTF (stderr, "%i", i); |
128 | while (i <= ITERATIONS) | 128 | while (i <= ITERATIONS) |
129 | { | 129 | { |
130 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n"); | 130 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n"); |
@@ -147,12 +147,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
147 | 147 | ||
148 | i++; | 148 | i++; |
149 | if (i <= ITERATIONS) | 149 | if (i <= ITERATIONS) |
150 | fprintf (stderr, "..%i", i); | 150 | FPRINTF (stderr, "..%i", i); |
151 | } | 151 | } |
152 | 152 | ||
153 | tth = GNUNET_TRANSPORT_TESTING_init (); | 153 | tth = GNUNET_TRANSPORT_TESTING_init (); |
154 | 154 | ||
155 | fprintf (stderr, "\n"); | 155 | FPRINTF (stderr, "%s", "\n"); |
156 | end (); | 156 | end (); |
157 | } | 157 | } |
158 | 158 | ||
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index c358e6fd8..72a2c67da 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -680,7 +680,7 @@ output_message (enum GNUNET_ErrorType kind, const char *comp, | |||
680 | 680 | ||
681 | if (GNUNET_stderr != NULL) | 681 | if (GNUNET_stderr != NULL) |
682 | { | 682 | { |
683 | fprintf (GNUNET_stderr, "%s %s %s %s", datestr, comp, | 683 | FPRINTF (GNUNET_stderr, "%s %s %s %s", datestr, comp, |
684 | GNUNET_error_type_to_string (kind), msg); | 684 | GNUNET_error_type_to_string (kind), msg); |
685 | fflush (GNUNET_stderr); | 685 | fflush (GNUNET_stderr); |
686 | } | 686 | } |
diff --git a/src/util/configuration.c b/src/util/configuration.c index 41a4e1975..eb86d0496 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -309,7 +309,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
309 | sec = cfg->sections; | 309 | sec = cfg->sections; |
310 | while (sec != NULL) | 310 | while (sec != NULL) |
311 | { | 311 | { |
312 | if (0 > fprintf (fp, "[%s]\n", sec->name)) | 312 | if (0 > FPRINTF (fp, "[%s]\n", sec->name)) |
313 | { | 313 | { |
314 | error = 1; | 314 | error = 1; |
315 | break; | 315 | break; |
@@ -327,7 +327,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
327 | pos[0] = '\\'; | 327 | pos[0] = '\\'; |
328 | pos[1] = 'n'; | 328 | pos[1] = 'n'; |
329 | } | 329 | } |
330 | if (0 > fprintf (fp, "%s = %s\n", ent->key, val)) | 330 | if (0 > FPRINTF (fp, "%s = %s\n", ent->key, val)) |
331 | { | 331 | { |
332 | error = 1; | 332 | error = 1; |
333 | GNUNET_free (val); | 333 | GNUNET_free (val); |
@@ -339,7 +339,7 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
339 | } | 339 | } |
340 | if (error != 0) | 340 | if (error != 0) |
341 | break; | 341 | break; |
342 | if (0 > fprintf (fp, "\n")) | 342 | if (0 > FPRINTF (fp, "%s\n", "")) |
343 | { | 343 | { |
344 | error = 1; | 344 | error = 1; |
345 | break; | 345 | break; |
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index ff20646f7..121dbef9a 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c | |||
@@ -303,7 +303,7 @@ void __attribute__ ((constructor)) GNUNET_CRYPTO_random_init () | |||
303 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); | 303 | gcry_control (GCRYCTL_DISABLE_SECMEM, 0); |
304 | if (!gcry_check_version (GCRYPT_VERSION)) | 304 | if (!gcry_check_version (GCRYPT_VERSION)) |
305 | { | 305 | { |
306 | fprintf (stderr, | 306 | FPRINTF (stderr, |
307 | _ | 307 | _ |
308 | ("libgcrypt has not the expected version (version %s is required).\n"), | 308 | ("libgcrypt has not the expected version (version %s is required).\n"), |
309 | GCRYPT_VERSION); | 309 | GCRYPT_VERSION); |
diff --git a/src/util/getopt.c b/src/util/getopt.c index 08c133423..169949821 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -669,7 +669,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
669 | if (ambig && !exact) | 669 | if (ambig && !exact) |
670 | { | 670 | { |
671 | if (GNopterr) | 671 | if (GNopterr) |
672 | fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], | 672 | FPRINTF (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], |
673 | argv[GNoptind]); | 673 | argv[GNoptind]); |
674 | nextchar += strlen (nextchar); | 674 | nextchar += strlen (nextchar); |
675 | GNoptind++; | 675 | GNoptind++; |
@@ -692,12 +692,12 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
692 | { | 692 | { |
693 | if (argv[GNoptind - 1][1] == '-') | 693 | if (argv[GNoptind - 1][1] == '-') |
694 | /* --option */ | 694 | /* --option */ |
695 | fprintf (stderr, | 695 | FPRINTF (stderr, |
696 | _("%s: option `--%s' does not allow an argument\n"), | 696 | _("%s: option `--%s' does not allow an argument\n"), |
697 | argv[0], pfound->name); | 697 | argv[0], pfound->name); |
698 | else | 698 | else |
699 | /* +option or -option */ | 699 | /* +option or -option */ |
700 | fprintf (stderr, | 700 | FPRINTF (stderr, |
701 | _("%s: option `%c%s' does not allow an argument\n"), | 701 | _("%s: option `%c%s' does not allow an argument\n"), |
702 | argv[0], argv[GNoptind - 1][0], pfound->name); | 702 | argv[0], argv[GNoptind - 1][0], pfound->name); |
703 | } | 703 | } |
@@ -715,7 +715,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
715 | { | 715 | { |
716 | if (GNopterr) | 716 | if (GNopterr) |
717 | { | 717 | { |
718 | fprintf (stderr, _("%s: option `%s' requires an argument\n"), | 718 | FPRINTF (stderr, _("%s: option `%s' requires an argument\n"), |
719 | argv[0], argv[GNoptind - 1]); | 719 | argv[0], argv[GNoptind - 1]); |
720 | } | 720 | } |
721 | nextchar += strlen (nextchar); | 721 | nextchar += strlen (nextchar); |
@@ -744,11 +744,11 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
744 | { | 744 | { |
745 | if (argv[GNoptind][1] == '-') | 745 | if (argv[GNoptind][1] == '-') |
746 | /* --option */ | 746 | /* --option */ |
747 | fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], | 747 | FPRINTF (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], |
748 | nextchar); | 748 | nextchar); |
749 | else | 749 | else |
750 | /* +option or -option */ | 750 | /* +option or -option */ |
751 | fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], | 751 | FPRINTF (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], |
752 | argv[GNoptind][0], nextchar); | 752 | argv[GNoptind][0], nextchar); |
753 | } | 753 | } |
754 | nextchar = (char *) ""; | 754 | nextchar = (char *) ""; |
@@ -773,9 +773,9 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
773 | { | 773 | { |
774 | if (posixly_correct) | 774 | if (posixly_correct) |
775 | /* 1003.2 specifies the format of this message. */ | 775 | /* 1003.2 specifies the format of this message. */ |
776 | fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); | 776 | FPRINTF (stderr, _("%s: illegal option -- %c\n"), argv[0], c); |
777 | else | 777 | else |
778 | fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); | 778 | FPRINTF (stderr, _("%s: invalid option -- %c\n"), argv[0], c); |
779 | } | 779 | } |
780 | return '?'; | 780 | return '?'; |
781 | } | 781 | } |
@@ -803,7 +803,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
803 | if (GNopterr) | 803 | if (GNopterr) |
804 | { | 804 | { |
805 | /* 1003.2 specifies the format of this message. */ | 805 | /* 1003.2 specifies the format of this message. */ |
806 | fprintf (stderr, _("%s: option requires an argument -- %c\n"), | 806 | FPRINTF (stderr, _("%s: option requires an argument -- %c\n"), |
807 | argv[0], c); | 807 | argv[0], c); |
808 | } | 808 | } |
809 | if (optstring[0] == ':') | 809 | if (optstring[0] == ':') |
@@ -851,7 +851,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
851 | if (ambig && !exact) | 851 | if (ambig && !exact) |
852 | { | 852 | { |
853 | if (GNopterr) | 853 | if (GNopterr) |
854 | fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], | 854 | FPRINTF (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], |
855 | argv[GNoptind]); | 855 | argv[GNoptind]); |
856 | nextchar += strlen (nextchar); | 856 | nextchar += strlen (nextchar); |
857 | GNoptind++; | 857 | GNoptind++; |
@@ -869,7 +869,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
869 | else | 869 | else |
870 | { | 870 | { |
871 | if (GNopterr) | 871 | if (GNopterr) |
872 | fprintf (stderr, _("\ | 872 | FPRINTF (stderr, _("\ |
873 | %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name); | 873 | %s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name); |
874 | 874 | ||
875 | nextchar += strlen (nextchar); | 875 | nextchar += strlen (nextchar); |
@@ -883,7 +883,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
883 | else | 883 | else |
884 | { | 884 | { |
885 | if (GNopterr) | 885 | if (GNopterr) |
886 | fprintf (stderr, _("%s: option `%s' requires an argument\n"), | 886 | FPRINTF (stderr, _("%s: option `%s' requires an argument\n"), |
887 | argv[0], argv[GNoptind - 1]); | 887 | argv[0], argv[GNoptind - 1]); |
888 | nextchar += strlen (nextchar); | 888 | nextchar += strlen (nextchar); |
889 | return optstring[0] == ':' ? ':' : '?'; | 889 | return optstring[0] == ':' ? ':' : '?'; |
@@ -931,7 +931,7 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, | |||
931 | if (GNopterr) | 931 | if (GNopterr) |
932 | { | 932 | { |
933 | /* 1003.2 specifies the format of this message. */ | 933 | /* 1003.2 specifies the format of this message. */ |
934 | fprintf (stderr, _("%s: option requires an argument -- %c\n"), | 934 | FPRINTF (stderr, _("%s: option requires an argument -- %c\n"), |
935 | argv[0], c); | 935 | argv[0], c); |
936 | } | 936 | } |
937 | if (optstring[0] == ':') | 937 | if (optstring[0] == ':') |
@@ -1035,7 +1035,7 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
1035 | } | 1035 | } |
1036 | if (i == count) | 1036 | if (i == count) |
1037 | { | 1037 | { |
1038 | fprintf (stderr, _("Use --help to get a list of options.\n")); | 1038 | FPRINTF (stderr, _("Use %s to get a list of options.\n"), "--help"); |
1039 | cont = GNUNET_SYSERR; | 1039 | cont = GNUNET_SYSERR; |
1040 | } | 1040 | } |
1041 | } | 1041 | } |
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index c74b90877..8fb3673c0 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -252,7 +252,7 @@ GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
252 | 252 | ||
253 | if (1 != SSCANF (value, "%llu", val)) | 253 | if (1 != SSCANF (value, "%llu", val)) |
254 | { | 254 | { |
255 | fprintf (stderr, _("You must pass a number to the `%s' option.\n"), option); | 255 | FPRINTF (stderr, _("You must pass a number to the `%s' option.\n"), option); |
256 | return GNUNET_SYSERR; | 256 | return GNUNET_SYSERR; |
257 | } | 257 | } |
258 | return GNUNET_OK; | 258 | return GNUNET_OK; |
@@ -280,7 +280,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
280 | 280 | ||
281 | if (1 != SSCANF (value, "%u", val)) | 281 | if (1 != SSCANF (value, "%u", val)) |
282 | { | 282 | { |
283 | fprintf (stderr, _("You must pass a number to the `%s' option.\n"), option); | 283 | FPRINTF (stderr, _("You must pass a number to the `%s' option.\n"), option); |
284 | return GNUNET_SYSERR; | 284 | return GNUNET_SYSERR; |
285 | } | 285 | } |
286 | return GNUNET_OK; | 286 | return GNUNET_OK; |
diff --git a/src/util/plugin.c b/src/util/plugin.c index fe5fb87f9..4e0385a09 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c | |||
@@ -86,7 +86,7 @@ plugin_init () | |||
86 | err = lt_dlinit (); | 86 | err = lt_dlinit (); |
87 | if (err > 0) | 87 | if (err > 0) |
88 | { | 88 | { |
89 | fprintf (stderr, _("Initialization of plugin mechanism failed: %s!\n"), | 89 | FPRINTF (stderr, _("Initialization of plugin mechanism failed: %s!\n"), |
90 | lt_dlerror ()); | 90 | lt_dlerror ()); |
91 | return; | 91 | return; |
92 | } | 92 | } |
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c index 950f0cedb..438d39751 100644 --- a/src/util/test_common_allocation.c +++ b/src/util/test_common_allocation.c | |||
@@ -105,7 +105,7 @@ main (int argc, char *argv[]) | |||
105 | GNUNET_log_setup ("test-common-allocation", "WARNING", NULL); | 105 | GNUNET_log_setup ("test-common-allocation", "WARNING", NULL); |
106 | ret = check (); | 106 | ret = check (); |
107 | if (ret != 0) | 107 | if (ret != 0) |
108 | fprintf (stderr, "ERROR %d.\n", ret); | 108 | FPRINTF (stderr, "ERROR %d.\n", ret); |
109 | return ret; | 109 | return ret; |
110 | } | 110 | } |
111 | 111 | ||
diff --git a/src/util/test_common_logging.c b/src/util/test_common_logging.c index d057db099..934586926 100644 --- a/src/util/test_common_logging.c +++ b/src/util/test_common_logging.c | |||
@@ -44,7 +44,7 @@ main (int argc, char *argv[]) | |||
44 | unsigned int logs = 0; | 44 | unsigned int logs = 0; |
45 | 45 | ||
46 | if (0 != putenv ("GNUNET_FORCE_LOG=")) | 46 | if (0 != putenv ("GNUNET_FORCE_LOG=")) |
47 | fprintf (stderr, "Failed to putenv: %s\n", strerror (errno)); | 47 | FPRINTF (stderr, "Failed to putenv: %s\n", strerror (errno)); |
48 | GNUNET_log_setup ("test-common-logging", "DEBUG", "/dev/null"); | 48 | GNUNET_log_setup ("test-common-logging", "DEBUG", "/dev/null"); |
49 | GNUNET_logger_add (&my_log, &logs); | 49 | GNUNET_logger_add (&my_log, &logs); |
50 | GNUNET_logger_add (&my_log, &logs); | 50 | GNUNET_logger_add (&my_log, &logs); |
@@ -60,7 +60,7 @@ main (int argc, char *argv[]) | |||
60 | GNUNET_logger_remove (&my_log, &logs); | 60 | GNUNET_logger_remove (&my_log, &logs); |
61 | if (logs != 4) | 61 | if (logs != 4) |
62 | { | 62 | { |
63 | fprintf (stdout, "Expected 4 log calls, got %u\n", logs); | 63 | FPRINTF (stdout, "Expected 4 log calls, got %u\n", logs); |
64 | failureCount++; | 64 | failureCount++; |
65 | } | 65 | } |
66 | GNUNET_break (0 == | 66 | GNUNET_break (0 == |
@@ -84,13 +84,13 @@ main (int argc, char *argv[]) | |||
84 | GNUNET_logger_remove (&my_log, &logs); | 84 | GNUNET_logger_remove (&my_log, &logs); |
85 | if (logs != 1) | 85 | if (logs != 1) |
86 | { | 86 | { |
87 | fprintf (stdout, "Expected 1 log call, got %u\n", logs); | 87 | FPRINTF (stdout, "Expected 1 log call, got %u\n", logs); |
88 | failureCount++; | 88 | failureCount++; |
89 | } | 89 | } |
90 | 90 | ||
91 | if (failureCount != 0) | 91 | if (failureCount != 0) |
92 | { | 92 | { |
93 | fprintf (stdout, "%u TESTS FAILED!\n", failureCount); | 93 | FPRINTF (stdout, "%u TESTS FAILED!\n", failureCount); |
94 | return -1; | 94 | return -1; |
95 | } | 95 | } |
96 | return 0; | 96 | return 0; |
diff --git a/src/util/test_common_logging_dummy.c b/src/util/test_common_logging_dummy.c index 005b5caef..9f6756ff4 100644 --- a/src/util/test_common_logging_dummy.c +++ b/src/util/test_common_logging_dummy.c | |||
@@ -37,7 +37,7 @@ my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component, | |||
37 | { | 37 | { |
38 | if (strncmp ("test-common-logging-dummy", component, 25) != 0) | 38 | if (strncmp ("test-common-logging-dummy", component, 25) != 0) |
39 | return; | 39 | return; |
40 | fprintf (stdout, "%s", msg); | 40 | FPRINTF (stdout, "%s", msg); |
41 | fflush (stdout); | 41 | fflush (stdout); |
42 | } | 42 | } |
43 | 43 | ||
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 9b5b1228a..51123d9b3 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -171,7 +171,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
171 | buf_ptr += rd; | 171 | buf_ptr += rd; |
172 | bytes += rd; | 172 | bytes += rd; |
173 | #if VERBOSE | 173 | #if VERBOSE |
174 | fprintf (stderr, "got %d bytes, reading more\n", rd); | 174 | FPRINTF (stderr, "got %d bytes, reading more\n", rd); |
175 | #endif | 175 | #endif |
176 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 176 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
177 | stdout_read_handle, &read_call, | 177 | stdout_read_handle, &read_call, |
@@ -180,7 +180,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
180 | } | 180 | } |
181 | 181 | ||
182 | #if VERBOSE | 182 | #if VERBOSE |
183 | fprintf (stderr, "bytes is %d:%s\n", bytes, buf); | 183 | FPRINTF (stderr, "bytes is %d:%s\n", bytes, buf); |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | /* +------CHILD OUTPUT-- | 186 | /* +------CHILD OUTPUT-- |
@@ -251,7 +251,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
251 | &delays[7], level))) | 251 | &delays[7], level))) |
252 | { | 252 | { |
253 | if (bytes == 20 * 16) | 253 | if (bytes == 20 * 16) |
254 | fprintf (stderr, "Ran out of buffer space!\n"); | 254 | FPRINTF (stderr, "%s", "Ran out of buffer space!\n"); |
255 | GNUNET_break (0); | 255 | GNUNET_break (0); |
256 | ok = 2; | 256 | ok = 2; |
257 | GNUNET_SCHEDULER_cancel (die_task); | 257 | GNUNET_SCHEDULER_cancel (die_task); |
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 3780b3649..b1a446f86 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c | |||
@@ -240,14 +240,14 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option) | |||
240 | GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData); | 240 | GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData); |
241 | if (1 == (ret = cbData.status)) | 241 | if (1 == (ret = cbData.status)) |
242 | { | 242 | { |
243 | fprintf (stderr, | 243 | FPRINTF (stderr, "%s", |
244 | "Incorrect Configuration Diffs: Diffs may contain data not actually edited\n"); | 244 | "Incorrect Configuration Diffs: Diffs may contain data not actually edited\n"); |
245 | goto housekeeping; | 245 | goto housekeeping; |
246 | } | 246 | } |
247 | cbData.cfgDiffs = cfg; | 247 | cbData.cfgDiffs = cfg; |
248 | GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData); | 248 | GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData); |
249 | if ((ret = cbData.status) == 1) | 249 | if ((ret = cbData.status) == 1) |
250 | fprintf (stderr, | 250 | FPRINTF (stderr, "%s", |
251 | "Incorrect Configuration Diffs: Data may be missing in diffs\n"); | 251 | "Incorrect Configuration Diffs: Data may be missing in diffs\n"); |
252 | 252 | ||
253 | housekeeping: | 253 | housekeeping: |
@@ -277,7 +277,7 @@ testConfig () | |||
277 | return 1; | 277 | return 1; |
278 | if (0 != strcmp ("b", c)) | 278 | if (0 != strcmp ("b", c)) |
279 | { | 279 | { |
280 | fprintf (stderr, "Got `%s'\n", c); | 280 | FPRINTF (stderr, "Got `%s'\n", c); |
281 | GNUNET_free (c); | 281 | GNUNET_free (c); |
282 | return 2; | 282 | return 2; |
283 | } | 283 | } |
@@ -470,7 +470,7 @@ main (int argc, char *argv[]) | |||
470 | if (GNUNET_OK != | 470 | if (GNUNET_OK != |
471 | GNUNET_CONFIGURATION_parse (cfg, "test_configuration_data.conf")) | 471 | GNUNET_CONFIGURATION_parse (cfg, "test_configuration_data.conf")) |
472 | { | 472 | { |
473 | fprintf (stderr, "Failed to parse configuration file\n"); | 473 | FPRINTF (stderr, "%s", "Failed to parse configuration file\n"); |
474 | GNUNET_CONFIGURATION_destroy (cfg); | 474 | GNUNET_CONFIGURATION_destroy (cfg); |
475 | return 1; | 475 | return 1; |
476 | } | 476 | } |
@@ -484,7 +484,7 @@ main (int argc, char *argv[]) | |||
484 | 484 | ||
485 | if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf")) | 485 | if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf")) |
486 | { | 486 | { |
487 | fprintf (stderr, "Failed to write configuration file\n"); | 487 | FPRINTF (stderr, "%s", "Failed to write configuration file\n"); |
488 | GNUNET_CONFIGURATION_destroy (cfg); | 488 | GNUNET_CONFIGURATION_destroy (cfg); |
489 | return 1; | 489 | return 1; |
490 | } | 490 | } |
@@ -546,7 +546,7 @@ main (int argc, char *argv[]) | |||
546 | error: | 546 | error: |
547 | if (failureCount != 0) | 547 | if (failureCount != 0) |
548 | { | 548 | { |
549 | fprintf (stderr, "Test failed: %u\n", failureCount); | 549 | FPRINTF (stderr, "Test failed: %u\n", failureCount); |
550 | return 1; | 550 | return 1; |
551 | } | 551 | } |
552 | return 0; | 552 | return 0; |
diff --git a/src/util/test_crypto_aes_weak.c b/src/util/test_crypto_aes_weak.c index a0161b575..0b7ba5c54 100644 --- a/src/util/test_crypto_aes_weak.c +++ b/src/util/test_crypto_aes_weak.c | |||
@@ -136,7 +136,7 @@ getWeakKeys () | |||
136 | { | 136 | { |
137 | 137 | ||
138 | if (number_of_runs % 1000 == 0) | 138 | if (number_of_runs % 1000 == 0) |
139 | fprintf (stderr, "."); | 139 | FPRINTF (stderr, "%s", "."); |
140 | /*printf("Got to run number %d.\n", number_of_runs); */ | 140 | /*printf("Got to run number %d.\n", number_of_runs); */ |
141 | GNUNET_CRYPTO_aes_create_session_key (&sessionkey); | 141 | GNUNET_CRYPTO_aes_create_session_key (&sessionkey); |
142 | 142 | ||
diff --git a/src/util/test_crypto_ksk.c b/src/util/test_crypto_ksk.c index 2789f5edb..58c459547 100644 --- a/src/util/test_crypto_ksk.c +++ b/src/util/test_crypto_ksk.c | |||
@@ -46,7 +46,7 @@ testCorrectKey () | |||
46 | int i; | 46 | int i; |
47 | char out[3]; | 47 | char out[3]; |
48 | 48 | ||
49 | fprintf (stderr, "Testing KBlock key correctness"); | 49 | FPRINTF (stderr, "%s", "Testing KBlock key correctness"); |
50 | GNUNET_CRYPTO_hash ("X", strlen ("X"), &in); | 50 | GNUNET_CRYPTO_hash ("X", strlen ("X"), &in); |
51 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); | 51 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); |
52 | if (hostkey == NULL) | 52 | if (hostkey == NULL) |
@@ -66,12 +66,12 @@ testCorrectKey () | |||
66 | snprintf (out, sizeof (out), "%02x", ((unsigned char *) &pkey)[i]); | 66 | snprintf (out, sizeof (out), "%02x", ((unsigned char *) &pkey)[i]); |
67 | if (0 != strncmp (out, &want[i * 2], 2)) | 67 | if (0 != strncmp (out, &want[i * 2], 2)) |
68 | { | 68 | { |
69 | fprintf (stderr, " Failed! Wanted %.2s but got %2s at %d\n", &want[i * 2], | 69 | FPRINTF (stderr, " Failed! Wanted %.2s but got %2s at %d\n", &want[i * 2], |
70 | out, i); | 70 | out, i); |
71 | return GNUNET_SYSERR; | 71 | return GNUNET_SYSERR; |
72 | } | 72 | } |
73 | } | 73 | } |
74 | fprintf (stderr, " OK\n"); | 74 | FPRINTF (stderr, "%s", " OK\n"); |
75 | return GNUNET_OK; | 75 | return GNUNET_OK; |
76 | } | 76 | } |
77 | 77 | ||
@@ -85,7 +85,7 @@ testMultiKey (const char *word) | |||
85 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1; | 85 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1; |
86 | int i; | 86 | int i; |
87 | 87 | ||
88 | fprintf (stderr, "Testing KBlock key uniqueness (%s) ", word); | 88 | FPRINTF (stderr, "Testing KBlock key uniqueness (%s) ", word); |
89 | GNUNET_CRYPTO_hash (word, strlen (word), &in); | 89 | GNUNET_CRYPTO_hash (word, strlen (word), &in); |
90 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); | 90 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); |
91 | if (hostkey == NULL) | 91 | if (hostkey == NULL) |
@@ -101,12 +101,12 @@ testMultiKey (const char *word) | |||
101 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 101 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
102 | for (i = 0; i < UNIQUE_ITER; i++) | 102 | for (i = 0; i < UNIQUE_ITER; i++) |
103 | { | 103 | { |
104 | fprintf (stderr, "."); | 104 | FPRINTF (stderr, "%s", "."); |
105 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); | 105 | hostkey = GNUNET_CRYPTO_rsa_key_create_from_hash (&in); |
106 | if (hostkey == NULL) | 106 | if (hostkey == NULL) |
107 | { | 107 | { |
108 | GNUNET_break (0); | 108 | GNUNET_break (0); |
109 | fprintf (stderr, " ERROR\n"); | 109 | FPRINTF (stderr, "%s", " ERROR\n"); |
110 | return GNUNET_SYSERR; | 110 | return GNUNET_SYSERR; |
111 | } | 111 | } |
112 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey1); | 112 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey1); |
@@ -116,11 +116,11 @@ testMultiKey (const char *word) | |||
116 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 116 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) |
117 | { | 117 | { |
118 | GNUNET_break (0); | 118 | GNUNET_break (0); |
119 | fprintf (stderr, " ERROR\n"); | 119 | FPRINTF (stderr, "%s", " ERROR\n"); |
120 | return GNUNET_SYSERR; | 120 | return GNUNET_SYSERR; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | fprintf (stderr, " OK\n"); | 123 | FPRINTF (stderr, "%s", " OK\n"); |
124 | return GNUNET_OK; | 124 | return GNUNET_OK; |
125 | } | 125 | } |
126 | 126 | ||
@@ -135,19 +135,19 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
135 | struct GNUNET_TIME_Absolute start; | 135 | struct GNUNET_TIME_Absolute start; |
136 | int ok; | 136 | int ok; |
137 | 137 | ||
138 | fprintf (stderr, "W"); | 138 | FPRINTF (stderr, "%s", "W"); |
139 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 139 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
140 | 140 | ||
141 | ok = 0; | 141 | ok = 0; |
142 | start = GNUNET_TIME_absolute_get (); | 142 | start = GNUNET_TIME_absolute_get (); |
143 | for (i = 0; i < ITER; i++) | 143 | for (i = 0; i < ITER; i++) |
144 | { | 144 | { |
145 | fprintf (stderr, "."); | 145 | FPRINTF (stderr, "%s", "."); |
146 | if (GNUNET_SYSERR == | 146 | if (GNUNET_SYSERR == |
147 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, | 147 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, |
148 | &target)) | 148 | &target)) |
149 | { | 149 | { |
150 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 150 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
151 | ok++; | 151 | ok++; |
152 | continue; | 152 | continue; |
153 | } | 153 | } |
@@ -155,7 +155,7 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
155 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, | 155 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, |
156 | strlen (TESTSTRING) + 1)) | 156 | strlen (TESTSTRING) + 1)) |
157 | { | 157 | { |
158 | fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); | 158 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); |
159 | ok++; | 159 | ok++; |
160 | continue; | 160 | continue; |
161 | } | 161 | } |
@@ -186,17 +186,17 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
186 | struct GNUNET_TIME_Absolute start; | 186 | struct GNUNET_TIME_Absolute start; |
187 | int ok = GNUNET_OK; | 187 | int ok = GNUNET_OK; |
188 | 188 | ||
189 | fprintf (stderr, "W"); | 189 | FPRINTF (stderr, "%s", "W"); |
190 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 190 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
191 | start = GNUNET_TIME_absolute_get (); | 191 | start = GNUNET_TIME_absolute_get (); |
192 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); | 192 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); |
193 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); | 193 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); |
194 | for (i = 0; i < ITER; i++) | 194 | for (i = 0; i < ITER; i++) |
195 | { | 195 | { |
196 | fprintf (stderr, "."); | 196 | FPRINTF (stderr, "%s", "."); |
197 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) | 197 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) |
198 | { | 198 | { |
199 | fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); | 199 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); |
200 | ok = GNUNET_SYSERR; | 200 | ok = GNUNET_SYSERR; |
201 | continue; | 201 | continue; |
202 | } | 202 | } |
diff --git a/src/util/test_crypto_random.c b/src/util/test_crypto_random.c index 46d3ed0aa..681947a60 100644 --- a/src/util/test_crypto_random.c +++ b/src/util/test_crypto_random.c | |||
@@ -43,7 +43,7 @@ test (enum GNUNET_CRYPTO_Quality mode) | |||
43 | b2 = GNUNET_CRYPTO_random_permute (mode, 1024); | 43 | b2 = GNUNET_CRYPTO_random_permute (mode, 1024); |
44 | if (0 == memcmp (b2, buf, sizeof (buf))) | 44 | if (0 == memcmp (b2, buf, sizeof (buf))) |
45 | { | 45 | { |
46 | fprintf (stderr, "!"); | 46 | FPRINTF (stderr, "%s", "!"); |
47 | GNUNET_free (b2); | 47 | GNUNET_free (b2); |
48 | continue; | 48 | continue; |
49 | } | 49 | } |
diff --git a/src/util/test_crypto_rsa.c b/src/util/test_crypto_rsa.c index f26a76a38..f6800afcd 100644 --- a/src/util/test_crypto_rsa.c +++ b/src/util/test_crypto_rsa.c | |||
@@ -47,7 +47,7 @@ testEncryptDecrypt () | |||
47 | struct GNUNET_TIME_Absolute start; | 47 | struct GNUNET_TIME_Absolute start; |
48 | int ok; | 48 | int ok; |
49 | 49 | ||
50 | fprintf (stderr, "W"); | 50 | FPRINTF (stderr, "%s", "W"); |
51 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 51 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
52 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 52 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
53 | 53 | ||
@@ -55,12 +55,12 @@ testEncryptDecrypt () | |||
55 | start = GNUNET_TIME_absolute_get (); | 55 | start = GNUNET_TIME_absolute_get (); |
56 | for (i = 0; i < ITER; i++) | 56 | for (i = 0; i < ITER; i++) |
57 | { | 57 | { |
58 | fprintf (stderr, "."); | 58 | FPRINTF (stderr, "%s", "."); |
59 | if (GNUNET_SYSERR == | 59 | if (GNUNET_SYSERR == |
60 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, | 60 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, |
61 | &target)) | 61 | &target)) |
62 | { | 62 | { |
63 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 63 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
64 | ok++; | 64 | ok++; |
65 | continue; | 65 | continue; |
66 | } | 66 | } |
@@ -68,7 +68,7 @@ testEncryptDecrypt () | |||
68 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, | 68 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, result, |
69 | strlen (TESTSTRING) + 1)) | 69 | strlen (TESTSTRING) + 1)) |
70 | { | 70 | { |
71 | fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); | 71 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); |
72 | ok++; | 72 | ok++; |
73 | continue; | 73 | continue; |
74 | 74 | ||
@@ -102,7 +102,7 @@ testEncryptPerformance () | |||
102 | struct GNUNET_TIME_Absolute start; | 102 | struct GNUNET_TIME_Absolute start; |
103 | int ok; | 103 | int ok; |
104 | 104 | ||
105 | fprintf (stderr, "W"); | 105 | FPRINTF (stderr, "%s", "W"); |
106 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 106 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
107 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 107 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
108 | 108 | ||
@@ -110,12 +110,12 @@ testEncryptPerformance () | |||
110 | start = GNUNET_TIME_absolute_get (); | 110 | start = GNUNET_TIME_absolute_get (); |
111 | for (i = 0; i < ITER; i++) | 111 | for (i = 0; i < ITER; i++) |
112 | { | 112 | { |
113 | fprintf (stderr, "."); | 113 | FPRINTF (stderr, "%s", "."); |
114 | if (GNUNET_SYSERR == | 114 | if (GNUNET_SYSERR == |
115 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, | 115 | GNUNET_CRYPTO_rsa_encrypt (TESTSTRING, strlen (TESTSTRING) + 1, &pkey, |
116 | &target)) | 116 | &target)) |
117 | { | 117 | { |
118 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 118 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
119 | ok++; | 119 | ok++; |
120 | continue; | 120 | continue; |
121 | } | 121 | } |
@@ -142,7 +142,7 @@ testEncryptDecryptSK () | |||
142 | struct GNUNET_TIME_Absolute start; | 142 | struct GNUNET_TIME_Absolute start; |
143 | int ok; | 143 | int ok; |
144 | 144 | ||
145 | fprintf (stderr, "W"); | 145 | FPRINTF (stderr, "%s", "W"); |
146 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 146 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
147 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 147 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
148 | 148 | ||
@@ -150,14 +150,14 @@ testEncryptDecryptSK () | |||
150 | start = GNUNET_TIME_absolute_get (); | 150 | start = GNUNET_TIME_absolute_get (); |
151 | for (i = 0; i < ITER; i++) | 151 | for (i = 0; i < ITER; i++) |
152 | { | 152 | { |
153 | fprintf (stderr, "."); | 153 | FPRINTF (stderr, "%s", "."); |
154 | GNUNET_CRYPTO_aes_create_session_key (&insk); | 154 | GNUNET_CRYPTO_aes_create_session_key (&insk); |
155 | if (GNUNET_SYSERR == | 155 | if (GNUNET_SYSERR == |
156 | GNUNET_CRYPTO_rsa_encrypt (&insk, | 156 | GNUNET_CRYPTO_rsa_encrypt (&insk, |
157 | sizeof (struct GNUNET_CRYPTO_AesSessionKey), | 157 | sizeof (struct GNUNET_CRYPTO_AesSessionKey), |
158 | &pkey, &target)) | 158 | &pkey, &target)) |
159 | { | 159 | { |
160 | fprintf (stderr, "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); | 160 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_encrypt returned SYSERR\n"); |
161 | ok++; | 161 | ok++; |
162 | continue; | 162 | continue; |
163 | } | 163 | } |
@@ -165,7 +165,7 @@ testEncryptDecryptSK () | |||
165 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, &outsk, | 165 | GNUNET_CRYPTO_rsa_decrypt (hostkey, &target, &outsk, |
166 | sizeof (struct GNUNET_CRYPTO_AesSessionKey))) | 166 | sizeof (struct GNUNET_CRYPTO_AesSessionKey))) |
167 | { | 167 | { |
168 | fprintf (stderr, "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); | 168 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_decrypt returned SYSERR\n"); |
169 | ok++; | 169 | ok++; |
170 | continue; | 170 | continue; |
171 | } | 171 | } |
@@ -198,7 +198,7 @@ testSignVerify () | |||
198 | struct GNUNET_TIME_Absolute start; | 198 | struct GNUNET_TIME_Absolute start; |
199 | int ok = GNUNET_OK; | 199 | int ok = GNUNET_OK; |
200 | 200 | ||
201 | fprintf (stderr, "W"); | 201 | FPRINTF (stderr, "%s", "W"); |
202 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 202 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
203 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 203 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
204 | start = GNUNET_TIME_absolute_get (); | 204 | start = GNUNET_TIME_absolute_get (); |
@@ -207,10 +207,10 @@ testSignVerify () | |||
207 | 207 | ||
208 | for (i = 0; i < ITER; i++) | 208 | for (i = 0; i < ITER; i++) |
209 | { | 209 | { |
210 | fprintf (stderr, "."); | 210 | FPRINTF (stderr, "%s", "."); |
211 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) | 211 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) |
212 | { | 212 | { |
213 | fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); | 213 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); |
214 | ok = GNUNET_SYSERR; | 214 | ok = GNUNET_SYSERR; |
215 | continue; | 215 | continue; |
216 | } | 216 | } |
@@ -253,16 +253,16 @@ testSignPerformance () | |||
253 | 253 | ||
254 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); | 254 | purp.size = htonl (sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose)); |
255 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); | 255 | purp.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); |
256 | fprintf (stderr, "W"); | 256 | FPRINTF (stderr, "%s", "W"); |
257 | hostkey = GNUNET_CRYPTO_rsa_key_create (); | 257 | hostkey = GNUNET_CRYPTO_rsa_key_create (); |
258 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); | 258 | GNUNET_CRYPTO_rsa_key_get_public (hostkey, &pkey); |
259 | start = GNUNET_TIME_absolute_get (); | 259 | start = GNUNET_TIME_absolute_get (); |
260 | for (i = 0; i < ITER; i++) | 260 | for (i = 0; i < ITER; i++) |
261 | { | 261 | { |
262 | fprintf (stderr, "."); | 262 | FPRINTF (stderr, "%s", "."); |
263 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) | 263 | if (GNUNET_SYSERR == GNUNET_CRYPTO_rsa_sign (hostkey, &purp, &sig)) |
264 | { | 264 | { |
265 | fprintf (stderr, "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); | 265 | FPRINTF (stderr, "%s", "GNUNET_CRYPTO_rsa_sign returned SYSERR\n"); |
266 | ok = GNUNET_SYSERR; | 266 | ok = GNUNET_SYSERR; |
267 | continue; | 267 | continue; |
268 | } | 268 | } |
diff --git a/src/util/test_disk.c b/src/util/test_disk.c index 91154a6f5..546277256 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c | |||
@@ -46,13 +46,13 @@ testReadWrite () | |||
46 | ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1); | 46 | ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1); |
47 | if (ret < 0) | 47 | if (ret < 0) |
48 | { | 48 | { |
49 | fprintf (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile"); | 49 | FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile"); |
50 | return 1; | 50 | return 1; |
51 | } | 51 | } |
52 | tmp[ret] = '\0'; | 52 | tmp[ret] = '\0'; |
53 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) | 53 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) |
54 | { | 54 | { |
55 | fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, | 55 | FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, |
56 | TESTSTRING, ".testfile"); | 56 | TESTSTRING, ".testfile"); |
57 | return 1; | 57 | return 1; |
58 | } | 58 | } |
@@ -61,14 +61,14 @@ testReadWrite () | |||
61 | ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1); | 61 | ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1); |
62 | if (ret < 0) | 62 | if (ret < 0) |
63 | { | 63 | { |
64 | fprintf (stderr, "Error reading file `%s' in testReadWrite\n", | 64 | FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", |
65 | ".testfile2"); | 65 | ".testfile2"); |
66 | return 1; | 66 | return 1; |
67 | } | 67 | } |
68 | tmp[ret] = '\0'; | 68 | tmp[ret] = '\0'; |
69 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) | 69 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) |
70 | { | 70 | { |
71 | fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, | 71 | FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, |
72 | TESTSTRING, ".testfile2"); | 72 | TESTSTRING, ".testfile2"); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
@@ -276,7 +276,7 @@ main (int argc, char *argv[]) | |||
276 | failureCount += testDirMani (); | 276 | failureCount += testDirMani (); |
277 | if (failureCount != 0) | 277 | if (failureCount != 0) |
278 | { | 278 | { |
279 | fprintf (stderr, "\n%u TESTS FAILED!\n", failureCount); | 279 | FPRINTF (stderr, "\n%u TESTS FAILED!\n", failureCount); |
280 | return -1; | 280 | return -1; |
281 | } | 281 | } |
282 | return 0; | 282 | return 0; |
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index df8520546..78538404a 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -75,7 +75,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
75 | bytes = GNUNET_DISK_file_read (stdout_read_handle, &buf, sizeof (buf)); | 75 | bytes = GNUNET_DISK_file_read (stdout_read_handle, &buf, sizeof (buf)); |
76 | 76 | ||
77 | #if VERBOSE | 77 | #if VERBOSE |
78 | fprintf (stderr, "bytes is %d\n", bytes); | 78 | FPRINTF (stderr, "bytes is %d\n", bytes); |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | if (bytes < 1) | 81 | if (bytes < 1) |
@@ -89,7 +89,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
89 | 89 | ||
90 | ok = strncmp (&buf[0], test_phrase, strlen (test_phrase)); | 90 | ok = strncmp (&buf[0], test_phrase, strlen (test_phrase)); |
91 | #if VERBOSE | 91 | #if VERBOSE |
92 | fprintf (stderr, "read %s\n", &buf[0]); | 92 | FPRINTF (stderr, "read %s\n", &buf[0]); |
93 | #endif | 93 | #endif |
94 | if (ok == 0) | 94 | if (ok == 0) |
95 | { | 95 | { |
diff --git a/src/util/test_peer.c b/src/util/test_peer.c index 3817d8243..9bf443600 100644 --- a/src/util/test_peer.c +++ b/src/util/test_peer.c | |||
@@ -69,7 +69,7 @@ check () | |||
69 | pid = GNUNET_PEER_intern (&pidArr[i]); | 69 | pid = GNUNET_PEER_intern (&pidArr[i]); |
70 | if (pid != (i + 1)) | 70 | if (pid != (i + 1)) |
71 | { | 71 | { |
72 | fprintf (stderr, "Unexpected Peer ID returned by intern function\n"); | 72 | FPRINTF (stderr, "%s", "Unexpected Peer ID returned by intern function\n"); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
75 | } | 75 | } |
@@ -80,7 +80,7 @@ check () | |||
80 | pid = GNUNET_PEER_intern (&pidArr[i]); | 80 | pid = GNUNET_PEER_intern (&pidArr[i]); |
81 | if (pid != (i + 1)) | 81 | if (pid != (i + 1)) |
82 | { | 82 | { |
83 | fprintf (stderr, "Unexpected Peer ID returned by intern function\n"); | 83 | FPRINTF (stderr, "%s", "Unexpected Peer ID returned by intern function\n"); |
84 | return 1; | 84 | return 1; |
85 | } | 85 | } |
86 | } | 86 | } |
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 4e248aa72..75140f8d5 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c | |||
@@ -264,8 +264,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
264 | _("gethostbyname() could not lookup IP address: %s\n"), | 264 | _("gethostbyname() could not lookup IP address: %s\n"), |
265 | hstrerror (h_errno)); | 265 | hstrerror (h_errno)); |
266 | #endif | 266 | #endif |
267 | fprintf (stderr, | 267 | FPRINTF (stderr, |
268 | "System seems to be off-line, will not run all DNS tests\n"); | 268 | "System seems to be off-line, will not run all DNS tests\n", NULL); |
269 | *ok = 0; /* mark test as passing anyway */ | 269 | *ok = 0; /* mark test as passing anyway */ |
270 | return; | 270 | return; |
271 | } | 271 | } |
@@ -422,7 +422,7 @@ check () | |||
422 | GNUNET_OS_process_close (proc); | 422 | GNUNET_OS_process_close (proc); |
423 | proc = NULL; | 423 | proc = NULL; |
424 | if (ok != 0) | 424 | if (ok != 0) |
425 | fprintf (stderr, "Missed some resolutions: %u\n", ok); | 425 | FPRINTF (stderr, "Missed some resolutions: %u\n", ok); |
426 | return ok; | 426 | return ok; |
427 | } | 427 | } |
428 | 428 | ||
diff --git a/src/util/test_scheduler_delay.c b/src/util/test_scheduler_delay.c index ff6966a87..9cbf7d90f 100644 --- a/src/util/test_scheduler_delay.c +++ b/src/util/test_scheduler_delay.c | |||
@@ -59,10 +59,10 @@ test_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
59 | target = | 59 | target = |
60 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply | 60 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply |
61 | (GNUNET_TIME_UNIT_MILLISECONDS, i)); | 61 | (GNUNET_TIME_UNIT_MILLISECONDS, i)); |
62 | fprintf (stderr, "."); | 62 | FPRINTF (stderr, "%s", "."); |
63 | if (i > MAXV) | 63 | if (i > MAXV) |
64 | { | 64 | { |
65 | fprintf (stderr, "\n"); | 65 | FPRINTF (stderr, "%s", "\n"); |
66 | return; | 66 | return; |
67 | } | 67 | } |
68 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 68 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
@@ -79,13 +79,13 @@ check () | |||
79 | FPRINTF (stdout, "Sleep precision: %llu ms. ", | 79 | FPRINTF (stdout, "Sleep precision: %llu ms. ", |
80 | cumDelta / 1000 / (MAXV / INCR)); | 80 | cumDelta / 1000 / (MAXV / INCR)); |
81 | if (cumDelta <= 10 * MAXV / INCR) | 81 | if (cumDelta <= 10 * MAXV / INCR) |
82 | fprintf (stdout, "Timer precision is excellent.\n"); | 82 | FPRINTF (stdout, "%s", "Timer precision is excellent.\n"); |
83 | else if (cumDelta <= 50 * MAXV / INCR) /* 50 ms average deviation */ | 83 | else if (cumDelta <= 50 * MAXV / INCR) /* 50 ms average deviation */ |
84 | fprintf (stdout, "Timer precision is good.\n"); | 84 | FPRINTF (stdout, "%s", "Timer precision is good.\n"); |
85 | else if (cumDelta > 250 * MAXV / INCR) | 85 | else if (cumDelta > 250 * MAXV / INCR) |
86 | fprintf (stdout, "Timer precision is awful.\n"); | 86 | FPRINTF (stdout, "%s", "Timer precision is awful.\n"); |
87 | else | 87 | else |
88 | fprintf (stdout, "Timer precision is acceptable.\n"); | 88 | FPRINTF (stdout, "%s", "Timer precision is acceptable.\n"); |
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/src/util/test_service.c b/src/util/test_service.c index 1b78932f8..eff8c7570 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -270,7 +270,7 @@ main (int argc, char *argv[]) | |||
270 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); | 270 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); |
271 | return 1; | 271 | return 1; |
272 | } | 272 | } |
273 | fprintf (stderr, | 273 | FPRINTF (stderr, |
274 | "IPv6 support seems to not be available (%s), not testing it!\n", | 274 | "IPv6 support seems to not be available (%s), not testing it!\n", |
275 | strerror (errno)); | 275 | strerror (errno)); |
276 | } | 276 | } |
diff --git a/src/util/test_strings.c b/src/util/test_strings.c index c6d604144..7e68153d7 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c | |||
@@ -89,7 +89,7 @@ check () | |||
89 | * however, the "0:05 19" should always be there; hence: */ | 89 | * however, the "0:05 19" should always be there; hence: */ |
90 | if (NULL == strstr (r, "0:05 19")) | 90 | if (NULL == strstr (r, "0:05 19")) |
91 | { | 91 | { |
92 | fprintf (stderr, "Got %s\n", r); | 92 | FPRINTF (stderr, "Got %s\n", r); |
93 | GNUNET_break (0); | 93 | GNUNET_break (0); |
94 | GNUNET_free (r); | 94 | GNUNET_free (r); |
95 | return 1; | 95 | return 1; |