1,
GNUNET_NO);
stat_hellos_obtained++;
- GNUNET_TRANSPORT_offer_hello (transport, msg);
+ GNUNET_TRANSPORT_offer_hello (transport, msg, NULL, NULL);
}
else
{
*
* @param cls closure
* @param peer peer identity this notification is about
- * @param latency reported latency of the connection with 'other'
- * @param distance reported distance (DV) to 'other'
+ * @param atsi performance data
*/
static void
handler_connect (void *cls,
const struct
GNUNET_PeerIdentity * peer,
- struct GNUNET_TIME_Relative latency,
- uint32_t distance)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi)
{
GNUNET_assert (stat_connection_count < UINT_MAX);
stat_connection_count++;
GNUNET_assert (stat_connection_count > 0);
stat_connection_count--;
GNUNET_STATISTICS_update (stats,
- gettext_noop ("# active connections"),
- -1,
- GNUNET_NO);
+ gettext_noop ("# active connections"),
+ -1,
+ GNUNET_NO);
}
/**
* @param cls closure (always NULL)
* @param peer the peer sending the message
* @param message the actual message
- * @param latency latency
- * @param distance distance
+ * @param atsi performance data
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
static int
handler_advertisement (void *cls,
- const struct GNUNET_PeerIdentity * peer,
- const struct GNUNET_MessageHeader * message,
- struct GNUNET_TIME_Relative latency,
- uint32_t distance)
+ const struct GNUNET_PeerIdentity * peer,
+ const struct GNUNET_MessageHeader * message,
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi)
{
size_t size;
size_t uri_size;
"HOSTLISTFILE", "HOSTLIST");
return;
}
+ if (GNUNET_SYSERR == GNUNET_DISK_directory_create_for_file (filename))
+ {
+ GNUNET_free (filename);
+ return;
+ }
wh = GNUNET_BIO_write_open (filename);
if ( NULL == wh)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Writing %u hostlist URIs to `%s'\n" ),
linked_list_size, filename);
-
/* add code to write hostlists to file using bio */
ok = GNUNET_YES;
counter = 0;