summaryrefslogtreecommitdiff
path: root/src/peerinfo-tool
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-01-03 10:28:17 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-01-03 10:28:17 +0000
commit320c2d50b722eeffc50cd6db0c5361886ee750b0 (patch)
tree73d94d4766a398e58e68998db8d3538557eb2a75 /src/peerinfo-tool
parentb85229645add2ce8255eb8ee620b6807a96f8e81 (diff)
Fixed failing test and discrepancy between documentation and implemented functionality:
GNUNET_PEERINFO_iterate never returns NULL, but always an iterator context GNUNET_PEERINFO_iterate calls callback with Peer==NULL and HELLO==NULL when timeout occurs
Diffstat (limited to 'src/peerinfo-tool')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index 7a0877995..42adcaad8 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -142,7 +142,7 @@ print_address (void *cls,
addrlen,
no_resolve,
tname,
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20),
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
&process_resolved_address,
pc);
return GNUNET_OK;
@@ -164,6 +164,7 @@ print_peer_info (void *cls,
if (peer == NULL)
{
+ fprintf (stderr,_("Error in communication with PEERINFO service\n"));
GNUNET_PEERINFO_disconnect (peerinfo);
return;
}
@@ -222,13 +223,11 @@ run (void *cls,
_("Could not access PEERINFO service. Exiting.\n"));
return;
}
- if (NULL == GNUNET_PEERINFO_iterate (peerinfo,
+ GNUNET_PEERINFO_iterate (peerinfo,
NULL,
GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 20),
- &print_peer_info, NULL))
- fprintf (stderr,
- _("Error in communication with PEERINFO service\n"));
+ (GNUNET_TIME_UNIT_SECONDS, 5),
+ &print_peer_info, NULL);
}
else
{