gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: handle missconfiguration more ni


From: gnunet
Subject: [taler-exchange] branch master updated: handle missconfiguration more nicely
Date: Sun, 08 Dec 2019 22:48:03 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 45a7b98d handle missconfiguration more nicely
45a7b98d is described below

commit 45a7b98d4b06489310691e9a47d3f2c5b2bc450e
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Dec 8 22:47:57 2019 +0100

    handle missconfiguration more nicely
---
 src/exchange/taler-exchange-httpd_terms.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_terms.c 
b/src/exchange/taler-exchange-httpd_terms.c
index 8c25e538..e475a026 100644
--- a/src/exchange/taler-exchange-httpd_terms.c
+++ b/src/exchange/taler-exchange-httpd_terms.c
@@ -171,6 +171,7 @@ TEH_handler_terms (struct TEH_RequestHandler *rh,
                                         MHD_HEADER_KIND,
                                         MHD_HTTP_HEADER_IF_NONE_MATCH);
     if ( (NULL != etag) &&
+         (NULL != terms_etag) &&
          (0 == strcasecmp (etag,
                            terms_etag)) )
     {
@@ -205,7 +206,7 @@ TEH_handler_terms (struct TEH_RequestHandler *rh,
       mime = "text/html";
     /* Find best match: must match mime type (if possible), and if
        mime type matches, ideally also language */
-    for (unsigned int i = 0; NULL != terms[i].terms; i++)
+    for (unsigned int i = 0; i < terms_len; i++)
     {
       struct Terms *p = &terms[i];
 
@@ -332,9 +333,10 @@ load_terms (const char *path,
                 lang);
     return;
   }
-  if (0 != strncmp (terms_etag,
-                    name,
-                    ext - name - 1))
+  if ( (NULL == terms_etag) ||
+       (0 != strncmp (terms_etag,
+                      name,
+                      ext - name - 1)) )
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Filename `%s' does not match Etag `%s' in directory `%s/%s'. 
Ignoring it.\n",

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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