[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35271 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35271 - gnunet/src/rps |
Date: |
Sun, 15 Feb 2015 18:20:16 +0100 |
Author: ch3
Date: 2015-02-15 18:20:16 +0100 (Sun, 15 Feb 2015)
New Revision: 35271
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
- check for validity of peers
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-02-15 17:20:13 UTC (rev 35270)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-02-15 17:20:16 UTC (rev 35271)
@@ -657,7 +657,8 @@
/* If we don't know whether peer is live,
* get notified when we know it is live. */
- if (NULL == ctx->recv_channel
+ if (GNUNET_YES != get_peer_flag (ctx, VALID)
+ && NULL == ctx->recv_channel
&& NULL == ctx->is_live_task)
{
ctx->peer_id = *peer;
@@ -1226,7 +1227,6 @@
return GNUNET_SYSERR;
}
- /* Do actual logic */
sender = (struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info (
(struct GNUNET_CADET_Channel *) channel, GNUNET_CADET_OPTION_PEER);
// Guess simply casting isn't the nicest way...
@@ -1239,11 +1239,13 @@
return GNUNET_OK;
}
+ /* Do actual logic */
peers = (struct GNUNET_PeerIdentity *) &msg[1];
- for ( i = 0 ; i < ntohl (in_msg->num_peers) ; i++ )
+ for (i = 0 ; i < ntohl (in_msg->num_peers) ; i++)
{
peer_ctx = get_peer_ctx (peer_map, &peers[i]);
- if (NULL != peer_ctx->send_channel
+ if (GNUNET_YES == get_peer_flag (peer_ctx, VALID)
+ || NULL != peer_ctx->send_channel
|| NULL != peer_ctx->recv_channel)
{
if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35271 - gnunet/src/rps,
gnunet <=