/**
* @file topology/gnunet-daemon-topology.c
- * @brief code for maintaining the mesh topology
+ * @brief code for maintaining the cadet topology
* @author Christian Grothoff
*/
#include "platform.h"
{
struct Peer *ret;
- ret = GNUNET_malloc (sizeof (struct Peer));
+ ret = GNUNET_new (struct Peer);
ret->pid = *peer;
ret->is_friend = is_friend;
if (hello != NULL)
{
/* now! */
pl->hello_req =
- GNUNET_CORE_notify_transmit_ready (handle, GNUNET_YES, 0,
+ GNUNET_CORE_notify_transmit_ready (handle, GNUNET_YES,
+ GNUNET_CORE_PRIO_BEST_EFFORT,
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
&pl->pid, next_want,
&hello_advertising_ready, pl);
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Found myself `%s' in friend list (useless, ignored)\n"),
- GNUNET_i2s (&pid));
+ GNUNET_i2s (pid));
return;
}
(*entries_found)++;
* @param c configuration
*/
static void
-run (void *cls, char *const *args, const char *cfgfile,
+run (void *cls,
+ char *const *args,
+ const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
static struct GNUNET_CORE_MessageHandler handlers[] = {
blacklist = GNUNET_TRANSPORT_blacklist (cfg, &blacklist_check, NULL);
transport = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL);
handle =
- GNUNET_CORE_connect (cfg, NULL, &core_init, &connect_notify,
- &disconnect_notify, NULL, GNUNET_NO, NULL, GNUNET_NO,
+ GNUNET_CORE_connect (cfg, NULL,
+ &core_init,
+ &connect_notify,
+ &disconnect_notify,
+ NULL, GNUNET_NO,
+ NULL, GNUNET_NO,
handlers);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleaning_task,
NULL);
(GNUNET_OK ==
GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-topology",
_
- ("GNUnet topology control (maintaining P2P mesh and F2F constraints)"),
+ ("GNUnet topology control (maintaining P2P cadet and F2F constraints)"),
options, &run, NULL)) ? 0 : 1;
GNUNET_free ((void*) argv);
return ret;