diff options
Diffstat (limited to 'src/nse/gnunet-service-nse.c')
-rw-r--r-- | src/nse/gnunet-service-nse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 793f60694..ebf39585e 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -780,7 +780,7 @@ count_leading_zeroes (const struct GNUNET_HashCode *hash) | |||
780 | unsigned int hash_count; | 780 | unsigned int hash_count; |
781 | 781 | ||
782 | hash_count = 0; | 782 | hash_count = 0; |
783 | while (0 == GNUNET_CRYPTO_hash_get_bit (hash, hash_count)) | 783 | while (0 == GNUNET_CRYPTO_hash_get_bit_ltr (hash, hash_count)) |
784 | hash_count++; | 784 | hash_count++; |
785 | return hash_count; | 785 | return hash_count; |
786 | } | 786 | } |
@@ -806,7 +806,7 @@ check_proof_of_work (const struct GNUNET_CRYPTO_EddsaPublicKey *pkey, | |||
806 | GNUNET_memcpy (&buf[sizeof(val)], | 806 | GNUNET_memcpy (&buf[sizeof(val)], |
807 | pkey, | 807 | pkey, |
808 | sizeof(struct GNUNET_CRYPTO_EddsaPublicKey)); | 808 | sizeof(struct GNUNET_CRYPTO_EddsaPublicKey)); |
809 | GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof-of-work", | 809 | GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof", |
810 | buf, | 810 | buf, |
811 | sizeof(buf), | 811 | sizeof(buf), |
812 | &result); | 812 | &result); |
@@ -861,7 +861,7 @@ find_proof (void *cls) | |||
861 | while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) | 861 | while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) |
862 | { | 862 | { |
863 | GNUNET_memcpy (buf, &counter, sizeof(uint64_t)); | 863 | GNUNET_memcpy (buf, &counter, sizeof(uint64_t)); |
864 | GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof-of-work", | 864 | GNUNET_CRYPTO_pow_hash ("gnunet-nse-proof", |
865 | buf, | 865 | buf, |
866 | sizeof(buf), | 866 | sizeof(buf), |
867 | &result); | 867 | &result); |
@@ -1001,7 +1001,7 @@ handle_p2p_estimate (void *cls, | |||
1001 | if (NULL != lh) | 1001 | if (NULL != lh) |
1002 | GNUNET_TESTBED_LOGGER_write (lh, &t, sizeof(uint64_t)); | 1002 | GNUNET_TESTBED_LOGGER_write (lh, &t, sizeof(uint64_t)); |
1003 | if (NULL != histogram) | 1003 | if (NULL != histogram) |
1004 | GNUNET_BIO_write_int64 (histogram, t); | 1004 | GNUNET_BIO_write_int64 (histogram, "histogram-time", t); |
1005 | } | 1005 | } |
1006 | #endif | 1006 | #endif |
1007 | GNUNET_STATISTICS_update (stats, "# flood messages received", 1, GNUNET_NO); | 1007 | GNUNET_STATISTICS_update (stats, "# flood messages received", 1, GNUNET_NO); |
@@ -1299,7 +1299,7 @@ shutdown_task (void *cls) | |||
1299 | } | 1299 | } |
1300 | if (NULL != histogram) | 1300 | if (NULL != histogram) |
1301 | { | 1301 | { |
1302 | GNUNET_BIO_write_close (histogram); | 1302 | GNUNET_BIO_write_close (histogram, NULL); |
1303 | histogram = NULL; | 1303 | histogram = NULL; |
1304 | } | 1304 | } |
1305 | #endif | 1305 | #endif |
@@ -1453,7 +1453,7 @@ run (void *cls, | |||
1453 | GNUNET_assert ( | 1453 | GNUNET_assert ( |
1454 | 0 < GNUNET_asprintf (&histogram_fn, "%s/timestamps", histogram_dir)); | 1454 | 0 < GNUNET_asprintf (&histogram_fn, "%s/timestamps", histogram_dir)); |
1455 | GNUNET_free (histogram_dir); | 1455 | GNUNET_free (histogram_dir); |
1456 | histogram = GNUNET_BIO_write_open (histogram_fn); | 1456 | histogram = GNUNET_BIO_write_open_file (histogram_fn); |
1457 | if (NULL == histogram) | 1457 | if (NULL == histogram) |
1458 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1458 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1459 | "Unable to open histogram file `%s'\n", | 1459 | "Unable to open histogram file `%s'\n", |