[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] branch master updated: do not assert on bad
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] branch master updated: do not assert on bad config, also check return value |
Date: |
Sun, 16 Jun 2019 01:57:32 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository twister.
The following commit(s) were added to refs/heads/master by this push:
new 9e2e2a7 do not assert on bad config, also check return value
9e2e2a7 is described below
commit 9e2e2a7759dad741f060adaf1c11e0fc17f7310b
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jun 16 01:57:30 2019 +0200
do not assert on bad config, also check return value
---
src/twister/taler-twister-service.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/twister/taler-twister-service.c
b/src/twister/taler-twister-service.c
index e14959d..918dd5d 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -1843,7 +1843,7 @@ create_response (void *cls,
flip_path_dl))
{
GNUNET_free (flip_path_dl);
- flip_path_dl = NULL;
+ flip_path_dl = NULL;
}
}
@@ -2446,11 +2446,21 @@ run (void *cls,
/* No need to check return value. If given, we take,
* otherwise it stays zero. */
- GNUNET_CONFIGURATION_get_value_number (c,
- "twister",
- "CHAOS_RATE",
- &chaos_rate);
- GNUNET_assert (100 >= chaos_rate);
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (c,
+ "twister",
+ "CHAOS_RATE",
+ &chaos_rate))
+ chaos_rate = 0;
+ if (100 < chaos_rate)
+ {
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ "twister",
+ "CHAOS_RATE",
+ "must be below 100");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string
--
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: do not assert on bad config, also check return value,
gnunet <=