const struct GNUNET_PeerIdentity *peer = &pl->id;
struct DisconnectList *dl;
- if (NULL != dl->wh)
+ if (NULL != pl->wh)
{
- GNUNET_TRANSPORT_blacklist_cancel (dl->wh);
- dl->wh = NULL;
+ GNUNET_TRANSPORT_blacklist_cancel (pl->wh);
+ pl->wh = NULL;
}
pl->is_blocked = GNUNET_YES;
dl = GNUNET_malloc (sizeof (struct DisconnectList));
if (pl->is_blocked)
{
pl->wh = GNUNET_TRANSPORT_blacklist (sched, cfg,
- peer,
- GNUNET_TIME_UNIT_FOREVER_ZERO,
+ &pl->id,
+ GNUNET_TIME_UNIT_ZERO,
GNUNET_TIME_UNIT_FOREVER_REL,
&whitelist_done,
pl);
if (pos->hello_delay_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sched,
pos->hello_delay_task);
+ GNUNET_free_non_null (pos->hello);
+ if (pos->filter != NULL)
+ GNUNET_CONTAINER_bloomfilter_free (peer->filter);
GNUNET_free (pos);
}
if (peer == NULL)
peer = make_peer (&pid, hello, GNUNET_NO);
// FIXME: check if 'hello' is any different from peer->hello?
- GNUNET_free_non_null (peer->hello);
#if DEBUG_TOPOLOGY
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Found `%s' from peer `%s' for advertising\n",
GNUNET_i2s (&pid));
#endif
size = GNUNET_HELLO_size (hello);
+ GNUNET_free_non_null (peer->hello);
peer->hello = GNUNET_malloc (size);
memcpy (peer->hello, hello, size);
if (peer->filter != NULL)