[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] branch master updated: Try flipping index u
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] branch master updated: Try flipping index until a good one is found. |
Date: |
Mon, 04 Jun 2018 10:54:29 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository twister.
The following commit(s) were added to refs/heads/master by this push:
new 25da33b Try flipping index until a good one is found.
25da33b is described below
commit 25da33b51ff2fb1ba029d4baab233c83c7ea930c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Jun 4 10:54:02 2018 +0200
Try flipping index until a good one is found.
---
src/twister/taler-twister-service.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/twister/taler-twister-service.c
b/src/twister/taler-twister-service.c
index 8616ee2..5919172 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -957,17 +957,22 @@ flip_object (struct MHD_Connection *con,
#warning When free this?
current_value_flip = GNUNET_strdup (current_value);
- crockford_index = GNUNET_CRYPTO_random_u32
- (GNUNET_CRYPTO_QUALITY_WEAK,
- CROCKFORD_MAX_INDEX + 1);
flip_index = GNUNET_CRYPTO_random_u32
(GNUNET_CRYPTO_QUALITY_WEAK,
strlen (current_value_flip));
+ do{
+ crockford_index = GNUNET_CRYPTO_random_u32
+ (GNUNET_CRYPTO_QUALITY_STRONG,
+ CROCKFORD_MAX_INDEX + 1);
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Try flipping with Crockford index: %u\n",
+ crockford_index);
+ }
+ while (current_value_flip[flip_index] ==
+ crockford_chars[crockford_index]);
- /* flip the LSB. WARNING: if the flipping does NOT
- * reach a Crockford-friendly char, then the test cases
- * will get disoriented by "400 Bad request" responses. */
current_value_flip[flip_index] =
crockford_chars[crockford_index];
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-twister] branch master updated: Try flipping index until a good one is found.,
gnunet <=