aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c11
-rw-r--r--src/peerinfo/peerinfo_api.c9
2 files changed, 9 insertions, 11 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,
142 addrlen, 142 addrlen,
143 no_resolve, 143 no_resolve,
144 tname, 144 tname,
145 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20), 145 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
146 &process_resolved_address, 146 &process_resolved_address,
147 pc); 147 pc);
148 return GNUNET_OK; 148 return GNUNET_OK;
@@ -164,6 +164,7 @@ print_peer_info (void *cls,
164 164
165 if (peer == NULL) 165 if (peer == NULL)
166 { 166 {
167 fprintf (stderr,_("Error in communication with PEERINFO service\n"));
167 GNUNET_PEERINFO_disconnect (peerinfo); 168 GNUNET_PEERINFO_disconnect (peerinfo);
168 return; 169 return;
169 } 170 }
@@ -222,13 +223,11 @@ run (void *cls,
222 _("Could not access PEERINFO service. Exiting.\n")); 223 _("Could not access PEERINFO service. Exiting.\n"));
223 return; 224 return;
224 } 225 }
225 if (NULL == GNUNET_PEERINFO_iterate (peerinfo, 226 GNUNET_PEERINFO_iterate (peerinfo,
226 NULL, 227 NULL,
227 GNUNET_TIME_relative_multiply 228 GNUNET_TIME_relative_multiply
228 (GNUNET_TIME_UNIT_SECONDS, 20), 229 (GNUNET_TIME_UNIT_SECONDS, 5),
229 &print_peer_info, NULL)) 230 &print_peer_info, NULL);
230 fprintf (stderr,
231 _("Error in communication with PEERINFO service\n"));
232 } 231 }
233 else 232 else
234 { 233 {
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index a72435ffb..a0cb5c5c4 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -273,11 +273,11 @@ trigger_transmit (struct GNUNET_PEERINFO_Handle *h)
273 struct TransmissionQueueEntry *tqe; 273 struct TransmissionQueueEntry *tqe;
274 274
275 if (NULL == (tqe = h->tq_head)) 275 if (NULL == (tqe = h->tq_head))
276 return; 276 return NULL;
277 if (h->th != NULL) 277 if (h->th != NULL)
278 return; 278 return NULL;
279 if (h->in_receive == GNUNET_YES) 279 if (h->in_receive == GNUNET_YES)
280 return; 280 return NULL;
281 h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, 281 h->th = GNUNET_CLIENT_notify_transmit_ready (h->client,
282 tqe->size, 282 tqe->size,
283 GNUNET_TIME_absolute_get_remaining (tqe->timeout), 283 GNUNET_TIME_absolute_get_remaining (tqe->timeout),
@@ -551,8 +551,7 @@ signal_timeout (void *cls,
551 * @param timeout how long to wait until timing out 551 * @param timeout how long to wait until timing out
552 * @param callback the method to call for each peer 552 * @param callback the method to call for each peer
553 * @param callback_cls closure for callback 553 * @param callback_cls closure for callback
554 * @return NULL on error (in this case, 'callback' is never called!), 554 * @return iterator context
555 * otherwise an iterator context
556 */ 555 */
557struct GNUNET_PEERINFO_IteratorContext * 556struct GNUNET_PEERINFO_IteratorContext *
558GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, 557GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h,