static int
map_check_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
int *fail = cls;
static int
map_cleanup_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct PeerContainer *pc = value;
int map_ping_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct PeerContainer *pc = value;
}
pc = GNUNET_CONTAINER_multihashmap_get(peers, &peer->hashPubKey);
+ GNUNET_assert (NULL != pc);
+
if (source == th)
{
if (GNUNET_NO == pc->transport_connected)
}
pc = GNUNET_CONTAINER_multihashmap_get(peers, &peer->hashPubKey);
+ GNUNET_assert (NULL != pc);
+
if (source == th)
{
if (NULL != pc->th_ping)
init();
stats = GNUNET_STATISTICS_create ("watchdog", cfg);
- peers = GNUNET_CONTAINER_multihashmap_create (20);
+ peers = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO);
th = GNUNET_TRANSPORT_connect(cfg, NULL, NULL,
&transport_notify_receive_cb,
if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
return 2;
-
- return (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc, argv, "cn",
- gettext_noop ("help text"), options, &run,
- NULL)) ? ret : 1;
+ ret = (GNUNET_OK ==
+ GNUNET_PROGRAM_run (argc, argv, "cn",
+ gettext_noop ("help text"), options, &run,
+ NULL)) ? ret : 1;
+ GNUNET_free ((void*) argv);
+ return ret;
}
/* end of connection_watchdog.c */