diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-01-03 14:21:25 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-01-03 14:21:25 +0000 |
commit | 748e690fe49e2639076cb76e6a4a4c5eb04e130e (patch) | |
tree | f76bcad30b4efc1f8daaf309ba38c3496603ce82 /src/dv | |
parent | cb3c882dbb05a797728dfd8b5983ade5a8999eac (diff) | |
download | gnunet-748e690fe49e2639076cb76e6a4a4c5eb04e130e.tar.gz gnunet-748e690fe49e2639076cb76e6a4a4c5eb04e130e.zip |
Changed peerinfo api to distinguish between last element and timeout
Diffstat (limited to 'src/dv')
-rw-r--r-- | src/dv/gnunet-service-dv.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index cd54686f3..223b95fed 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -2806,11 +2806,13 @@ add_all_direct_neighbors (void *cls, | |||
2806 | * @param cls closure | 2806 | * @param cls closure |
2807 | * @param peer id of the peer, NULL for last call | 2807 | * @param peer id of the peer, NULL for last call |
2808 | * @param hello hello message for the peer (can be NULL) | 2808 | * @param hello hello message for the peer (can be NULL) |
2809 | * @param err_msg NULL if successful, otherwise contains error message | ||
2809 | */ | 2810 | */ |
2810 | static void | 2811 | static void |
2811 | process_peerinfo (void *cls, | 2812 | process_peerinfo (void *cls, |
2812 | const struct GNUNET_PeerIdentity *peer, | 2813 | const struct GNUNET_PeerIdentity *peer, |
2813 | const struct GNUNET_HELLO_Message *hello) | 2814 | const struct GNUNET_HELLO_Message *hello, |
2815 | const char *err_msg) | ||
2814 | { | 2816 | { |
2815 | struct PeerIteratorContext *peerinfo_iterator = cls; | 2817 | struct PeerIteratorContext *peerinfo_iterator = cls; |
2816 | struct DirectNeighbor *neighbor = peerinfo_iterator->neighbor; | 2818 | struct DirectNeighbor *neighbor = peerinfo_iterator->neighbor; |
@@ -2819,7 +2821,12 @@ process_peerinfo (void *cls, | |||
2819 | char *neighbor_pid; | 2821 | char *neighbor_pid; |
2820 | #endif | 2822 | #endif |
2821 | int sent; | 2823 | int sent; |
2822 | 2824 | if (err_msg != NULL) | |
2825 | { | ||
2826 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
2827 | _("Error in communication with PEERINFO service\n")); | ||
2828 | /* return; */ | ||
2829 | } | ||
2823 | if (peer == NULL) | 2830 | if (peer == NULL) |
2824 | { | 2831 | { |
2825 | if (distant->pkey == NULL) | 2832 | if (distant->pkey == NULL) |