#endif
if (dotOutFile != NULL)
{
- fprintf (dotOutFile, "}");
- fclose (dotOutFile);
+ FPRINTF (dotOutFile, "%s", "}");
+ FCLOSE (dotOutFile);
}
ok = 0;
if (dotOutFile != NULL)
{
- fprintf (dotOutFile, "}");
- fclose (dotOutFile);
+ FPRINTF (dotOutFile, "%s", "}");
+ FCLOSE (dotOutFile);
}
}
* Connect to the receiving peer
*/
pos->peer2handle =
- GNUNET_CORE_connect (pos->peer2->cfg, 1, pos, &init_notify_peer2,
+ GNUNET_CORE_connect (pos->peer2->cfg, pos, &init_notify_peer2,
&connect_notify_peer2, NULL, NULL, GNUNET_YES,
NULL, GNUNET_YES, handlers);
}
* Connect to the sending peer
*/
pos->peer1handle =
- GNUNET_CORE_connect (pos->peer1->cfg, 1, pos, &init_notify_peer1,
+ GNUNET_CORE_connect (pos->peer1->cfg, pos, &init_notify_peer1,
&connect_notify_peer1, NULL, NULL, GNUNET_NO, NULL,
GNUNET_NO, no_handlers);
if (dotOutFile != NULL)
{
if (distance == 1)
- fprintf (dotOutFile, "\tn%s -- n%s;\n", d->shortname, second_shortname);
+ FPRINTF (dotOutFile, "\tn%s -- n%s;\n", d->shortname, second_shortname);
else if (distance == 2)
- fprintf (dotOutFile, "\tn%s -- n%s [color=blue];\n", d->shortname,
+ FPRINTF (dotOutFile, "\tn%s -- n%s [color=blue];\n", d->shortname,
second_shortname);
else if (distance == 3)
- fprintf (dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname,
+ FPRINTF (dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname,
second_shortname);
else if (distance == 4)
- fprintf (dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname,
+ FPRINTF (dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname,
second_shortname);
else
- fprintf (dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname,
+ FPRINTF (dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname,
second_shortname);
}
GNUNET_free (second_shortname);
new_peer = GNUNET_malloc (sizeof (struct PeerContext));
new_peer->peer_handle =
- GNUNET_CORE_connect (cfg, 1, d, NULL, &all_connect_handler, NULL, NULL,
+ GNUNET_CORE_connect (cfg, d, NULL, &all_connect_handler, NULL, NULL,
GNUNET_NO, NULL, GNUNET_NO, no_handlers);
new_peer->daemon = d;
new_peer->next = all_peers;
dotOutFile = fopen (dotOutFileName, "w");
if (dotOutFile != NULL)
{
- fprintf (dotOutFile, "strict graph G {\n");
+ FPRINTF (dotOutFile, "%s", "strict graph G {\n");
}
#if VERBOSE
"connect_topology_option_modifier",
&connect_topology_option_modifier_string))
{
- if (sscanf
+ if (SSCANF
(connect_topology_option_modifier_string, "%lf",
&connect_topology_option_modifier) != 1)
{