aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-rps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/gnunet-rps.c')
-rw-r--r--src/rps/gnunet-rps.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/rps/gnunet-rps.c b/src/rps/gnunet-rps.c
index d2c497fd4..d0f905f51 100644
--- a/src/rps/gnunet-rps.c
+++ b/src/rps/gnunet-rps.c
@@ -59,7 +59,7 @@ static int stream_input;
59static uint64_t num_view_updates; 59static uint64_t num_view_updates;
60 60
61/** 61/**
62 * @brief Number of updates we want to receive 62 * @brief Number of peers we want to receive from stream
63 */ 63 */
64static uint64_t num_stream_peers; 64static uint64_t num_stream_peers;
65 65
@@ -154,11 +154,33 @@ view_update_handle (void *cls,
154 */ 154 */
155static void 155static void
156stream_input_handle (void *cls, 156stream_input_handle (void *cls,
157 const struct GNUNET_PeerIdentity *recv_peer) 157 uint64_t num_peers,
158 const struct GNUNET_PeerIdentity *recv_peers)
158{ 159{
159 // TODO when source of peer is sent, also print source 160 uint64_t i;
160 FPRINTF (stdout, "%s\n", 161 (void) cls;
161 GNUNET_i2s_full (recv_peer)); 162
163 if (0 == num_peers)
164 {
165 FPRINTF (stdout, "Empty view\n");
166 }
167 req_handle = NULL;
168 for (i = 0; i < num_peers; i++)
169 {
170 FPRINTF (stdout, "%s\n",
171 GNUNET_i2s_full (&recv_peers[i]));
172
173 if (1 == num_stream_peers)
174 {
175 ret = 0;
176 GNUNET_SCHEDULER_shutdown ();
177 break;
178 }
179 else if (1 < num_stream_peers)
180 {
181 num_stream_peers--;
182 }
183 }
162} 184}
163 185
164 186