aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
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
parentb85229645add2ce8255eb8ee620b6807a96f8e81 (diff)
downloadgnunet-320c2d50b722eeffc50cd6db0c5361886ee750b0.tar.gz
gnunet-320c2d50b722eeffc50cd6db0c5361886ee750b0.zip
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')
-rw-r--r--src/peerinfo/peerinfo_api.c9
1 files changed, 4 insertions, 5 deletions
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,