ret = 0;
if (try_connect)
{
- /*FIXME */
+ /* all done, terminate instantly */
+ if (verbosity > 0)
+ FPRINTF (stdout, _("Successfully connected to %s\n"), GNUNET_i2s (peer));
+ GNUNET_SCHEDULER_cancel (end);
+ end = GNUNET_SCHEDULER_add_now (&do_disconnect, NULL);
}
else if (benchmark_send)
{
¬ify_receive,
¬ify_connect,
¬ify_disconnect);
+ if (NULL == handle)
+ {
+ FPRINTF (stderr, _("Failed to connect to transport service\n"));
+ return;
+ }
+
GNUNET_TRANSPORT_try_connect (handle, &pid);
}
¬ify_receive,
¬ify_connect,
¬ify_disconnect);
+ if (NULL == handle)
+ {
+ FPRINTF (stderr, _("Failed to connect to transport service\n"));
+ return;
+ }
GNUNET_TRANSPORT_try_connect (handle, &pid);
end = GNUNET_SCHEDULER_add_delayed (benchmark_send ?
GNUNET_TIME_UNIT_FOREVER_REL :
handle =
GNUNET_TRANSPORT_connect (cfg, NULL, NULL, ¬ify_receive,
¬ify_connect, ¬ify_disconnect);
+ if (NULL == handle)
+ {
+ FPRINTF (stderr, _("Failed to connect to transport service\n"));
+ return;
+ }
GNUNET_TRANSPORT_try_connect (handle, &pid);
start_time = GNUNET_TIME_absolute_get ();
end =
&monitor_notify_disconnect);
if (NULL == handle)
{
- GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
+ FPRINTF (stderr, _("Failed to connect to transport service\n"));
return;
}
}