GNUNET_CONFIGURATION_get_value_filename (GST_cfg, "TRANSPORT",
"BLACKLIST_FILE", &fn))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Option `%s' in section `%s' not specified!\n",
- "BLACKLIST_FILE", "TRANSPORT");
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_DEBUG,
+ "transport", "BLACKLIST_FILE");
return;
}
if (GNUNET_OK != GNUNET_DISK_file_test (fn))
- GNUNET_DISK_fn_write (fn, NULL, 0,
- GNUNET_DISK_PERM_USER_READ |
- GNUNET_DISK_PERM_USER_WRITE);
+ {
+ GNUNET_free (fn);
+ return; /* no blacklist */
+ }
if (GNUNET_OK != GNUNET_DISK_file_size (fn,
&fsize, GNUNET_NO, GNUNET_YES))
{
GNUNET_free (fn);
return;
}
- if (fsize == 0)
+ if (0 == fsize)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, _("Blacklist file `%s' is empty.\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Blacklist file `%s' is empty.\n",
fn);
GNUNET_free (fn);
return;
* @param ats performance data
* @param ats_count number of entries in ats (excluding 0-termination)
* @param address the address
+ * @param bandwidth_in inbound quota in NBO
+ * @param bandwidth_out outbound quota in NBO
*/
static void
test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour,
const struct GNUNET_ATS_Information *ats,
uint32_t ats_count,
- const struct GNUNET_HELLO_Address *address)
+ const struct GNUNET_HELLO_Address *address,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
{
struct TestConnectionContext *tcc = cls;
struct GST_BlacklistCheck *bc;
GNUNET_i2s (peer), transport_name);
if (blacklist == NULL)
blacklist =
- GNUNET_CONTAINER_multihashmap_create (TRANSPORT_BLACKLIST_HT_SIZE);
+ GNUNET_CONTAINER_multihashmap_create (TRANSPORT_BLACKLIST_HT_SIZE,
+ GNUNET_NO);
GNUNET_CONTAINER_multihashmap_put (blacklist, &peer->hashPubKey,
GNUNET_strdup (transport_name),
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);