aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-service-nse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nse/gnunet-service-nse.c')
-rw-r--r--src/nse/gnunet-service-nse.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index d9687acd2..a0e7923ac 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -339,7 +339,7 @@ setup_estimate_message (struct GNUNET_NSE_ClientMessage *em)
339 std_dev = sqrt (variance); 339 std_dev = sqrt (variance);
340 current_std_dev = std_dev; 340 current_std_dev = std_dev;
341 current_size_estimate = mean; 341 current_size_estimate = mean;
342 342
343 em->header.size = htons (sizeof (struct GNUNET_NSE_ClientMessage)); 343 em->header.size = htons (sizeof (struct GNUNET_NSE_ClientMessage));
344 em->header.type = htons (GNUNET_MESSAGE_TYPE_NSE_ESTIMATE); 344 em->header.type = htons (GNUNET_MESSAGE_TYPE_NSE_ESTIMATE);
345 em->reserved = htonl (0); 345 em->reserved = htonl (0);
@@ -637,7 +637,8 @@ setup_flood_message (unsigned int slot, struct GNUNET_TIME_Absolute ts)
637 fm->pkey = my_public_key; 637 fm->pkey = my_public_key;
638 fm->proof_of_work = my_proof; 638 fm->proof_of_work = my_proof;
639 GNUNET_assert (GNUNET_OK == 639 GNUNET_assert (GNUNET_OK ==
640 GNUNET_CRYPTO_rsa_sign (my_private_key, &fm->purpose, &fm->signature)); 640 GNUNET_CRYPTO_rsa_sign (my_private_key, &fm->purpose,
641 &fm->signature));
641} 642}
642 643
643 644
@@ -826,9 +827,11 @@ find_proof (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
826 { 827 {
827 size_estimate_messages[i].proof_of_work = my_proof; 828 size_estimate_messages[i].proof_of_work = my_proof;
828 GNUNET_assert (GNUNET_OK == 829 GNUNET_assert (GNUNET_OK ==
829 GNUNET_CRYPTO_rsa_sign (my_private_key, 830 GNUNET_CRYPTO_rsa_sign (my_private_key,
830 &size_estimate_messages[i].purpose, 831 &size_estimate_messages
831 &size_estimate_messages[i].signature)); 832 [i].purpose,
833 &size_estimate_messages
834 [i].signature));
832 } 835 }
833 write_proof (); 836 write_proof ();
834 return; 837 return;
@@ -944,7 +947,7 @@ static int
944handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, 947handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
945 const struct GNUNET_MessageHeader *message, 948 const struct GNUNET_MessageHeader *message,
946 const struct GNUNET_ATS_Information *atsi, 949 const struct GNUNET_ATS_Information *atsi,
947 unsigned int atsi_count) 950 unsigned int atsi_count)
948{ 951{
949 const struct GNUNET_NSE_FloodMessage *incoming_flood; 952 const struct GNUNET_NSE_FloodMessage *incoming_flood;
950 struct GNUNET_TIME_Absolute ts; 953 struct GNUNET_TIME_Absolute ts;
@@ -1100,7 +1103,7 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
1100static void 1103static void
1101handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer, 1104handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
1102 const struct GNUNET_ATS_Information *atsi, 1105 const struct GNUNET_ATS_Information *atsi,
1103 unsigned int atsi_count) 1106 unsigned int atsi_count)
1104{ 1107{
1105 struct NSEPeerEntry *peer_entry; 1108 struct NSEPeerEntry *peer_entry;
1106 1109