-indentation
[oweals/gnunet.git] / src / transport / gnunet-service-transport_validation.c
index 8596c1f8da1938896bd7720a19de322cc19f8c65..7c2675df37fd2859728131509fb499b7d5fd7df0 100644 (file)
@@ -589,7 +589,7 @@ transmit_ping_if_allowed (void *cls,
                           message_buf, tsize,
                           PING_PRIORITY, ACCEPTABLE_PING_DELAY,
                           NULL, NULL);
-        network = papi->get_network (ve->address, session);
+        network = papi->get_network (papi->cls, session);
         if (GNUNET_ATS_NET_UNSPECIFIED == network)
         {
           GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
@@ -1058,7 +1058,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
     if (NULL == (papi = GST_plugins_find (plugin_name)))
     {
       /* we don't have the plugin for this address */
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                   _("Plugin `%s' not available, cannot confirm having this address\n"),
                   plugin_name);
       GNUNET_free (plugin_name);
@@ -1071,7 +1071,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
                                 gettext_noop
                                 ("# failed address checks during validation"), 1,
                                 GNUNET_NO);
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                   _("Address `%s' is not one of my addresses, not confirming PING\n"),
                   GST_plugins_a2s (&address));
       return GNUNET_SYSERR;
@@ -1082,7 +1082,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
                                 gettext_noop
                                 ("# successful address checks during validation"), 1,
                                 GNUNET_NO);
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                   "Address `%s' is one of my addresses, confirming PING\n",
                   GST_plugins_a2s (&address));
     }
@@ -1091,7 +1091,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
     {
       if (GNUNET_NO == buggy)
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                     _("Not confirming PING from peer `%s' with address `%s' since I cannot confirm having this address.\n"),
                     GNUNET_i2s (sender),
                     GST_plugins_a2s (&address));
@@ -1280,16 +1280,16 @@ validate_address_iterator (void *cls,
  * @param cls the 'struct ValidationEntry' with the validated address
  * @param max space in buf
  * @param buf where to add the address
- * @return number of bytes written, 0 to signal the
+ * @return number of bytes written, GNUNET_SYSERR to signal the
  *         end of the iteration.
  */
-static size_t
+static ssize_t
 add_valid_peer_address (void *cls, size_t max, void *buf)
 {
   struct ValidationEntry *ve = cls;
 
   if (GNUNET_YES == ve->copied)
-    return 0;                   /* terminate */
+    return GNUNET_SYSERR; /* Done */
   ve->copied = GNUNET_YES;
   return GNUNET_HELLO_add_address (ve->address, ve->valid_until, buf, max);
 }