gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] 02/02: -make static, return json_null()


From: gnunet
Subject: [taler-exchange] 02/02: -make static, return json_null()
Date: Thu, 29 Sep 2022 12:52:40 +0200

This is an automated email from the git hooks/post-receive script.

oec pushed a commit to branch master
in repository exchange.

commit 165b85ddd59ce4af9b3f28409b6210d8f688f17d
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Thu Sep 29 12:52:33 2022 +0200

    -make static, return json_null()
---
 src/extensions/extension_age_restriction.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/extensions/extension_age_restriction.c 
b/src/extensions/extension_age_restriction.c
index 7937f61a..00a03841 100644
--- a/src/extensions/extension_age_restriction.c
+++ b/src/extensions/extension_age_restriction.c
@@ -131,7 +131,7 @@ TALER_age_mask_to_string (
  *
  * @param ext Pointer to the current extension
  */
-void
+static void
 age_restriction_disable (
   struct TALER_Extension *ext)
 {
@@ -282,12 +282,12 @@ age_restriction_load_json_config (
 
 
 /**
- * @brief implements the TALER_Extension.load_json_config interface.
+ * @brief implements the TALER_Extension.config_to_json interface.
  *
  * @param ext if NULL, only tests the configuration
- * @return configuration as json_t* object
+ * @return configuration as json_t* object, maybe NULL
  */
-json_t *
+static json_t *
 age_restriction_config_to_json (
   const struct TALER_Extension *ext)
 {
@@ -295,7 +295,13 @@ age_restriction_config_to_json (
   json_t *conf;
 
   GNUNET_assert (NULL != ext);
-  GNUNET_assert (NULL != ext->config);
+
+  if (NULL == ext->config)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "age restriction not configured");
+    return json_null ();
+  }
 
   if (NULL != ext->config_json)
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]