aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index e70fb5355..80957f829 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -657,7 +657,8 @@ get_channel (struct GNUNET_CONTAINER_MultiPeerMap *peer_map,
657 657
658 /* If we don't know whether peer is live, 658 /* If we don't know whether peer is live,
659 * get notified when we know it is live. */ 659 * get notified when we know it is live. */
660 if (NULL == ctx->recv_channel 660 if (GNUNET_YES != get_peer_flag (ctx, VALID)
661 && NULL == ctx->recv_channel
661 && NULL == ctx->is_live_task) 662 && NULL == ctx->is_live_task)
662 { 663 {
663 ctx->peer_id = *peer; 664 ctx->peer_id = *peer;
@@ -1226,7 +1227,6 @@ handle_peer_pull_reply (void *cls,
1226 return GNUNET_SYSERR; 1227 return GNUNET_SYSERR;
1227 } 1228 }
1228 1229
1229 /* Do actual logic */
1230 sender = (struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info ( 1230 sender = (struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info (
1231 (struct GNUNET_CADET_Channel *) channel, GNUNET_CADET_OPTION_PEER); 1231 (struct GNUNET_CADET_Channel *) channel, GNUNET_CADET_OPTION_PEER);
1232 // Guess simply casting isn't the nicest way... 1232 // Guess simply casting isn't the nicest way...
@@ -1239,11 +1239,13 @@ handle_peer_pull_reply (void *cls,
1239 return GNUNET_OK; 1239 return GNUNET_OK;
1240 } 1240 }
1241 1241
1242 /* Do actual logic */
1242 peers = (struct GNUNET_PeerIdentity *) &msg[1]; 1243 peers = (struct GNUNET_PeerIdentity *) &msg[1];
1243 for ( i = 0 ; i < ntohl (in_msg->num_peers) ; i++ ) 1244 for (i = 0 ; i < ntohl (in_msg->num_peers) ; i++)
1244 { 1245 {
1245 peer_ctx = get_peer_ctx (peer_map, &peers[i]); 1246 peer_ctx = get_peer_ctx (peer_map, &peers[i]);
1246 if (NULL != peer_ctx->send_channel 1247 if (GNUNET_YES == get_peer_flag (peer_ctx, VALID)
1248 || NULL != peer_ctx->send_channel
1247 || NULL != peer_ctx->recv_channel) 1249 || NULL != peer_ctx->recv_channel)
1248 { 1250 {
1249 if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i]) 1251 if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i])