-fix time assertion introduce in last patch
[oweals/gnunet.git] / src / topology / gnunet-daemon-topology.c
index 051dccf50c81bc326ebfd6a1ddb49b40b5ebe87d..ba78f25dda985756c4b4be040eed2032240ae625 100644 (file)
@@ -20,7 +20,7 @@
 
 /**
  * @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"
@@ -483,7 +483,7 @@ make_peer (const struct GNUNET_PeerIdentity *peer,
 {
   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)
@@ -641,7 +641,8 @@ schedule_next_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   {
     /* 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);
@@ -1019,7 +1020,7 @@ handle_friend (void *cls,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 _("Found myself `%s' in friend list (useless, ignored)\n"),
-                GNUNET_i2s (&pid));
+                GNUNET_i2s (pid));
     return;
   }
   (*entries_found)++;
@@ -1208,7 +1209,9 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  * @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[] = {
@@ -1242,8 +1245,12 @@ run (void *cls, char *const *args, const char *cfgfile,
     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);
@@ -1286,7 +1293,7 @@ main (int argc, char *const *argv)
       (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;