gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35927 - gnunet/src/rps


From: gnunet
Subject: [GNUnet-SVN] r35927 - gnunet/src/rps
Date: Fri, 12 Jun 2015 01:25:56 +0200

Author: ch3
Date: 2015-06-12 01:25:56 +0200 (Fri, 12 Jun 2015)
New Revision: 35927

Modified:
   gnunet/src/rps/gnunet-service-rps.c
Log:
-fix hanling of pull replies

Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-06-11 23:25:54 UTC (rev 35926)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-06-11 23:25:56 UTC (rev 35927)
@@ -1724,24 +1724,27 @@
       continue;
     }
     #endif /* ENABLE_MALICIOUS */
-    peer_ctx = get_peer_ctx (peer_map, &peers[i]);
-    if (GNUNET_YES == get_peer_flag (peer_ctx, VALID)
-        || NULL != peer_ctx->send_channel
-        || NULL != peer_ctx->recv_channel)
+    if (GNUNET_YES != GNUNET_CRYPTO_cmp_peer_identity (&own_identity,
+                                                       &peers[i]))
     {
-      if (GNUNET_NO == in_arr (pull_list, pull_list_size, &peers[i])
-          && 0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, &peers[i]))
-        GNUNET_array_append (pull_list, pull_list_size, peers[i]);
+      peer_ctx = get_peer_ctx (peer_map, &peers[i]);
+      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]))
+          GNUNET_array_append (pull_list, pull_list_size, peers[i]);
+      }
+      else if (GNUNET_NO == insert_in_pull_list_scheduled (peer_ctx))
+      {
+        out_op.op = insert_in_pull_list;
+        out_op.op_cls = NULL;
+        GNUNET_array_append (peer_ctx->outstanding_ops,
+                             peer_ctx->num_outstanding_ops,
+                             out_op);
+        check_peer_live (peer_ctx);
+      }
     }
-    else if (GNUNET_NO == insert_in_pull_list_scheduled (peer_ctx))
-    {
-      out_op.op = insert_in_pull_list;
-      out_op.op_cls = NULL;
-      GNUNET_array_append (peer_ctx->outstanding_ops,
-                           peer_ctx->num_outstanding_ops,
-                           out_op);
-      check_peer_live (peer_ctx);
-    }
   }
 
   unset_peer_flag (sender_ctx, PULL_REPLY_PENDING);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]