aboutsummaryrefslogtreecommitdiff
path: root/src/nse
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-04 14:00:32 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-04 14:00:32 +0000
commit83b19539f4d322b43683f5838b72e9ec2c8e6073 (patch)
treed0ab9329fcbefe360d9d14e2ace21a6b3396dfe9 /src/nse
parent28a2eb43281a1f08a67954f07beb9af3a9bc9a35 (diff)
downloadgnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.tar.gz
gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.zip
curly wars / auto-indentation
Diffstat (limited to 'src/nse')
-rw-r--r--src/nse/gnunet-nse-profiler.c12
-rw-r--r--src/nse/gnunet-service-nse.c17
2 files changed, 16 insertions, 13 deletions
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index ecd594e86..4ad689be9 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -589,14 +589,14 @@ run (void *cls, char *const *args, const char *cfgfile,
589 &data_filename)) 589 &data_filename))
590 { 590 {
591 data_file = 591 data_file =
592 GNUNET_DISK_file_open (data_filename, 592 GNUNET_DISK_file_open (data_filename,
593 GNUNET_DISK_OPEN_READWRITE | 593 GNUNET_DISK_OPEN_READWRITE |
594 GNUNET_DISK_OPEN_CREATE, 594 GNUNET_DISK_OPEN_CREATE,
595 GNUNET_DISK_PERM_USER_READ | 595 GNUNET_DISK_PERM_USER_READ |
596 GNUNET_DISK_PERM_USER_WRITE); 596 GNUNET_DISK_PERM_USER_WRITE);
597 if (data_file == NULL) 597 if (data_file == NULL)
598 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", 598 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n",
599 data_filename); 599 data_filename);
600 GNUNET_free (data_filename); 600 GNUNET_free (data_filename);
601 } 601 }
602 602
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