/*
This file is part of GNUnet.
- Copyright (C) 2009-2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009-2015 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* Clean up the "oh" field in the @a cls
*
* @param cls a `struct ConnectInfo`
- * @param tc unused
*/
static void
-offer_hello_done (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+offer_hello_done (void *cls)
{
struct ConnectInfo *ci = cls;
const struct GNUNET_PeerIdentity *peer,
void *value)
{
- struct ConnectInfo *ci = cls;
+ struct ConnectInfo *ci = value;
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multipeermap_remove (all_desired_peers,
return;
}
if (NULL == ci)
+ {
ci = GNUNET_new (struct ConnectInfo);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CONTAINER_multipeermap_put (all_desired_peers,
+ pid,
+ ci,
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
+ }
if ( (NULL != GDS_transport_handle) &&
(NULL != ci->oh) &&
(NULL != h) )
* and attempt to connect to them.
*
* @param cls closure for this task
- * @param tc the context under which the task is running
*/
static void
-send_find_peer_message (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+send_find_peer_message (void *cls)
{
struct GNUNET_TIME_Relative next_send_time;
struct BloomConstructorContext bcc;
struct GNUNET_CONTAINER_BloomFilter *peer_bf;
find_peer_task = NULL;
- if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
- return;
if (newly_found_peers > bucket_size)
{
/* If we are finding many peers already, no need to send out our request right now! */
}
}
+
/**
* Get the ID of the local node.
*