[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: fix regex
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: fix regex |
Date: |
Wed, 10 Mar 2021 23:26:58 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 11e37f5 fix regex
11e37f5 is described below
commit 11e37f5ac9a9ef196bcda61f69593d5255d0d188
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Mar 10 23:26:54 2021 +0100
fix regex
---
src/authorization/anastasis_authorization_plugin_sms.c | 8 ++++----
src/backend/anastasis-httpd.c | 3 ++-
src/backend/anastasis-httpd_config.c | 1 +
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/authorization/anastasis_authorization_plugin_sms.c
b/src/authorization/anastasis_authorization_plugin_sms.c
index 0dbdf89..98a58e0 100644
--- a/src/authorization/anastasis_authorization_plugin_sms.c
+++ b/src/authorization/anastasis_authorization_plugin_sms.c
@@ -436,12 +436,12 @@ libanastasis_plugin_authorization_sms_init (void *cls)
ctx = GNUNET_new (struct SMS_Context);
{
int regex_result;
- const char *regexp = "^+?[0-9]+$";
+ const char *regexp = "^\\+?[0-9]+$";
regex_result = regcomp (&ctx->regex,
regexp,
REG_EXTENDED);
- if (0 < regex_result)
+ if (0 != regex_result)
{
GNUNET_break (0);
GNUNET_free (ctx);
@@ -461,12 +461,12 @@ libanastasis_plugin_authorization_sms_init (void *cls)
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
"authorization-sms",
- "SMSAUTH_COMMAND",
+ "COMMAND",
&ctx->auth_command))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"authorization-sms",
- "SMSAUTH_COMMAND");
+ "COMMAND");
regfree (&ctx->regex);
GNUNET_free (ctx);
GNUNET_free (plugin);
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index 7c2214f..6d3c60f 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -854,7 +854,8 @@ run (void *cls,
if (NULL == mhd)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to launch HTTP service, exiting.\n");
+ "Failed to launch HTTP service (port %u in use?), exiting.\n",
+ port);
GNUNET_SCHEDULER_shutdown ();
return;
}
diff --git a/src/backend/anastasis-httpd_config.c
b/src/backend/anastasis-httpd_config.c
index c23614e..fe5847c 100644
--- a/src/backend/anastasis-httpd_config.c
+++ b/src/backend/anastasis-httpd_config.c
@@ -68,6 +68,7 @@ add_methods (void *cls,
section,
"cost",
TALER_JSON_from_amount (&cost));
+ GNUNET_assert (NULL != method);
GNUNET_assert (
0 ==
json_array_append_new (method_arr,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-anastasis] branch master updated: fix regex,
gnunet <=