-adding some rudimentary logging
[oweals/gnunet.git] / src / topology / gnunet-daemon-topology.c
index e8704552bfcfc2dd0f1dc9a5c1e968e86c4d824a..38a648afc03bce3d24f19f91857e42d951375427 100644 (file)
@@ -376,8 +376,9 @@ attempt_connect (struct Peer *pos)
               GNUNET_i2s (&pos->pid));
 #endif
   GNUNET_STATISTICS_update (stats,
-                            gettext_noop ("# connect requests issued to transport"),
-                            1, GNUNET_NO);
+                            gettext_noop
+                            ("# connect requests issued to transport"), 1,
+                            GNUNET_NO);
   GNUNET_TRANSPORT_try_connect (transport, &pos->pid);
 }
 
@@ -632,10 +633,12 @@ reschedule_hellos (void *cls, const GNUNET_HashCode * pid, void *value)
  * @param cls closure
  * @param peer peer identity this notification is about
  * @param atsi performance data
+ * @param atsi_count number of records in 'atsi'
  */
 static void
 connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                const struct GNUNET_ATS_Information *atsi,
+                unsigned int atsi_count)
 {
   struct Peer *pos;
 
@@ -771,16 +774,13 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
  * Iterator called on each address.
  *
  * @param cls flag that we will set if we see any addresses
- * @param tname name of the transport
+ * @param address the address of the peer
  * @param expiration when will the given address expire
- * @param addr the address of the peer
- * @param addrlen number of bytes in addr
  * @return GNUNET_SYSERR always, to terminate iteration
  */
 static int
-address_iterator (void *cls, const char *tname,
-                  struct GNUNET_TIME_Absolute expiration, const void *addr,
-                  uint16_t addrlen)
+address_iterator (void *cls, const struct GNUNET_HELLO_Address *address,
+                  struct GNUNET_TIME_Absolute expiration)
 {
   int *flag = cls;
 
@@ -1100,13 +1100,15 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
  *        for loopback messages where we are both sender and receiver)
  * @param message the actual HELLO message
  * @param atsi performance data
+ * @param atsi_count number of records in 'atsi'
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
  */
 static int
 handle_encrypted_hello (void *cls, const struct GNUNET_PeerIdentity *other,
                         const struct GNUNET_MessageHeader *message,
-                        const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+                        const struct GNUNET_ATS_Information *atsi,
+                        unsigned int atsi_count)
 {
   struct Peer *peer;
   struct GNUNET_PeerIdentity pid;
@@ -1278,8 +1280,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   transport = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL);
   handle =
       GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_notify,
-                           &disconnect_notify, NULL, NULL, GNUNET_NO, NULL,
-                           GNUNET_NO, handlers);
+                           &disconnect_notify, NULL, GNUNET_NO, NULL, GNUNET_NO,
+                           handlers);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleaning_task,
                                 NULL);
   if (NULL == transport)