const char *buf;
#if DETAILS
- fprintf (stderr, "!"); /* message complete, good! */
+ FPRINTF (stderr, "%s", "!"); /* message complete, good! */
#endif
buf = (const char *) hdr;
for (i = sizeof (struct GNUNET_MessageHeader); i < ntohs (hdr->size); i++)
total++;
#if ! DETAILS
if (0 == (total % (NUM_MSGS / 100)))
- fprintf (stderr, ".");
+ FPRINTF (stderr, "%s", ".");
#endif
/* tolerate 10% loss, i.e. due to duplicate fragment IDs */
if ((total >= NUM_MSGS - (NUM_MSGS / 10)) && (ret != 0))
if (ret == GNUNET_OK)
{
#if DETAILS
- fprintf (stderr, "@"); /* good ACK */
+ FPRINTF (stderr, "%s", "@"); /* good ACK */
#endif
GNUNET_FRAGMENT_context_destroy (frags[i]);
frags[i] = NULL;
if (ret == GNUNET_NO)
{
#if DETAILS
- fprintf (stderr, "@"); /* good ACK */
+ FPRINTF (stderr, "%s", "@"); /* good ACK */
#endif
acks++;
return;
}
}
#if DETAILS
- fprintf (stderr, "_"); /* BAD: ack that nobody feels responsible for... */
+ FPRINTF (stderr, "%s", "_"); /* BAD: ack that nobody feels responsible for... */
#endif
}
}
if (NULL == defrag)
{
- fprintf (stderr, "E"); /* Error: frag after shutdown!? */
+ FPRINTF (stderr, "%s", "E"); /* Error: frag after shutdown!? */
return;
}
ret = GNUNET_DEFRAGMENT_process_fragment (defrag, hdr);
if (ret == GNUNET_NO)
{
#if DETAILS
- fprintf (stderr, "?"); /* duplicate fragment */
+ FPRINTF (stderr, "%s", "?"); /* duplicate fragment */
#endif
dups++;
}
else if (ret == GNUNET_OK)
{
#if DETAILS
- fprintf (stderr, "."); /* good fragment */
+ FPRINTF (stderr, "%s", "."); /* good fragment */
#endif
fragc++;
}
100);
GNUNET_PROGRAM_run (5, argv_prog, "test-fragmentation", "nohelp", options,
&run, NULL);
- fprintf (stderr,
+ FPRINTF (stderr,
"\nHad %u good fragments, %u duplicate fragments, %u acks and %u simulated drops of acks\n",
fragc, dups, acks, ack_drops);
return ret;