[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35368 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35368 - gnunet/src/rps |
Date: |
Tue, 10 Mar 2015 13:20:29 +0100 |
Author: ch3
Date: 2015-03-10 13:20:29 +0100 (Tue, 10 Mar 2015)
New Revision: 35368
Modified:
gnunet/src/rps/rps_api.c
Log:
- renaming
Modified: gnunet/src/rps/rps_api.c
===================================================================
--- gnunet/src/rps/rps_api.c 2015-03-10 12:20:27 UTC (rev 35367)
+++ gnunet/src/rps/rps_api.c 2015-03-10 12:20:29 UTC (rev 35368)
@@ -317,8 +317,8 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Client turns malicious with %" PRIX32 " other peers:\n",
- n);
- for (i = 0 ; i < n ; i++)
+ num_peers);
+ for (i = 0 ; i < num_peers ; i++)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"%u. peer: %s\n",
i,
@@ -326,7 +326,7 @@
/* The actual size the message occupies */
size_needed = sizeof (struct GNUNET_RPS_CS_SeedMessage) +
- n * sizeof (struct GNUNET_PeerIdentity);
+ num_peers * sizeof (struct GNUNET_PeerIdentity);
/* The number of peers that fits in one message together with
* the respective header */
num_peers_max = (GNUNET_SERVER_MAX_MESSAGE_SIZE -
@@ -339,24 +339,24 @@
ev = GNUNET_MQ_msg_extra (msg,
num_peers_max * sizeof (struct
GNUNET_PeerIdentity),
GNUNET_MESSAGE_TYPE_RPS_ACT_MALICIOUS);
- msg->type = ntohl (type);
- msg->num_peers = ntohl (num_peers_max);
+ msg->type = htonl (type);
+ msg->num_peers = htonl (num_peers_max);
memcpy (&msg[1], tmp_peer_pointer, num_peers_max * sizeof (struct
GNUNET_PeerIdentity));
GNUNET_MQ_send (h->mq, ev);
- n -= num_peers_max;
+ num_peers -= num_peers_max;
size_needed = sizeof (struct GNUNET_RPS_CS_SeedMessage) +
- n * sizeof (struct GNUNET_PeerIdentity);
+ num_peers * sizeof (struct GNUNET_PeerIdentity);
/* Set pointer to beginning of next block of num_peers_max peers */
tmp_peer_pointer = &ids[num_peers_max];
}
ev = GNUNET_MQ_msg_extra (msg,
- n * sizeof (struct GNUNET_PeerIdentity),
+ num_peers * sizeof (struct GNUNET_PeerIdentity),
GNUNET_MESSAGE_TYPE_RPS_ACT_MALICIOUS);
msg->type = htonl (type);
- msg->num_peers = htonl (n);
- memcpy (&msg[1], tmp_peer_pointer, n * sizeof (struct GNUNET_PeerIdentity));
+ msg->num_peers = htonl (num_peers);
+ memcpy (&msg[1], tmp_peer_pointer, num_peers * sizeof (struct
GNUNET_PeerIdentity));
GNUNET_MQ_send (h->mq, ev);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35368 - gnunet/src/rps,
gnunet <=