[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35445 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35445 - gnunet/src/rps |
Date: |
Wed, 25 Mar 2015 18:16:52 +0100 |
Author: ch3
Date: 2015-03-25 18:16:52 +0100 (Wed, 25 Mar 2015)
New Revision: 35445
Modified:
gnunet/src/rps/gnunet-service-rps.c
gnunet/src/rps/rps_api.c
Log:
-optical changes
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-03-25 17:16:49 UTC (rev 35444)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-03-25 17:16:52 UTC (rev 35445)
@@ -1035,7 +1035,7 @@
GNUNET_free (ids);
cli_ctx = GNUNET_SERVER_client_get_user_context (client, struct client_ctx);
- if ( NULL == cli_ctx ) {
+ if (NULL == cli_ctx) {
cli_ctx = GNUNET_new (struct client_ctx);
cli_ctx->mq = GNUNET_MQ_queue_for_server_client (client);
GNUNET_SERVER_client_set_user_context (client, cli_ctx);
@@ -1096,8 +1096,8 @@
*/
static void
handle_client_seed (void *cls,
- struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message)
+ struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message)
{
struct GNUNET_RPS_CS_SeedMessage *in_msg;
struct GNUNET_PeerIdentity *peers;
@@ -1204,8 +1204,9 @@
struct GNUNET_RPS_P2P_PullReplyMessage *out_msg;
- peer = (struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info (channel,
-
GNUNET_CADET_OPTION_PEER);
+ peer = (struct GNUNET_PeerIdentity *)
+ GNUNET_CADET_channel_get_info (channel,
+ GNUNET_CADET_OPTION_PEER);
// FIXME wait for cadet to change this function
/* Compute actual size */
@@ -1215,6 +1216,7 @@
if (GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE < send_size)
/* Compute number of peers to send
* If too long, simply truncate */
+ // TODO select random ones via permutation
send_size =
(GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE -
sizeof (struct GNUNET_RPS_P2P_PullReplyMessage)) /
@@ -1301,6 +1303,7 @@
return GNUNET_OK;
}
+
/* Do actual logic */
peers = (struct GNUNET_PeerIdentity *) &msg[1];
for (i = 0 ; i < ntohl (in_msg->num_peers) ; i++)
Modified: gnunet/src/rps/rps_api.c
===================================================================
--- gnunet/src/rps/rps_api.c 2015-03-25 17:16:49 UTC (rev 35444)
+++ gnunet/src/rps/rps_api.c 2015-03-25 17:16:52 UTC (rev 35445)
@@ -333,7 +333,7 @@
/* The actual size the message occupies */
size_needed = sizeof (struct GNUNET_RPS_CS_SeedMessage) +
num_peers * sizeof (struct GNUNET_PeerIdentity);
- /* The number of peers that fits in one message together with
+ /* The number of peers that fit in one message together with
* the respective header */
num_peers_max = (GNUNET_SERVER_MAX_MESSAGE_SIZE -
sizeof (struct GNUNET_RPS_CS_SeedMessage)) /
@@ -365,7 +365,6 @@
memcpy (&msg[1], tmp_peer_pointer, num_peers * sizeof (struct
GNUNET_PeerIdentity));
GNUNET_MQ_send (h->mq, ev);
-
}
#endif /* ENABLE_MALICIOUS */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35445 - gnunet/src/rps,
gnunet <=