- update default values, eliminate obsolete ones
[oweals/gnunet.git] / src / peerinfo-tool / gnunet-peerinfo.c
index b16ad9cbf3df7f0e041c9f751a918d3e3a330d13..d826a805082f688517d789d6ad13886cba34e83a 100644 (file)
@@ -282,15 +282,10 @@ process_resolved_address (void *cls,
   }
   ar->atsc = NULL;
   if (GNUNET_SYSERR == res)
-  {
-    FPRINTF (stderr,
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
              _("Failure: Cannot convert address to string for peer `%s'\n"),
              GNUNET_i2s (&ar->pc->peer));
-  }
-  else
-  {
-    pc->num_addresses++;
-  }
+  pc->num_addresses++;
   if (pc->num_addresses == pc->address_list_size)
     dump_pc (pc);
 }
@@ -339,8 +334,7 @@ print_address (void *cls,
   ar->atsc = GNUNET_TRANSPORT_address_to_string (cfg,
                                                  address,
                                                  no_resolve,
-                                                GNUNET_TIME_relative_multiply
-                                                (GNUNET_TIME_UNIT_SECONDS, 10),
+                                                TIMEOUT,
                                                 &process_resolved_address, ar);
   return GNUNET_OK;
 }
@@ -593,10 +587,10 @@ parse_hello_uri (const char *put_uri)
 {
   struct GNUNET_HELLO_Message *hello = NULL;
 
-  int ret = GNUNET_HELLO_parse_uri(put_uri,
-                                   &my_peer_identity.public_key,
-                                  &hello,
-                                   &GPI_plugins_find);
+  int ret = GNUNET_HELLO_parse_uri (put_uri,
+                                    &my_peer_identity.public_key,
+                                    &hello,
+                                    &GPI_plugins_find);
 
   if (NULL != hello)
   {
@@ -609,10 +603,6 @@ parse_hello_uri (const char *put_uri)
       tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
     GNUNET_free (hello);
   }
-
-  /* wait 1s to give peerinfo operation a chance to succeed */
-  /* FIXME: current peerinfo API sucks to require this; not to mention
-     that we get no feedback to determine if the operation actually succeeded */
   return ret;
 }