gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: check for 204 first


From: gnunet
Subject: [taler-exchange] branch master updated: check for 204 first
Date: Wed, 15 Jan 2020 22:11:39 +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 77281fa3 check for 204 first
77281fa3 is described below

commit 77281fa319f8cfb079bdffe63cef51b6aeb24cc7
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Jan 15 22:11:32 2020 +0100

    check for 204 first
---
 src/lib/testing_api_cmd_bank_history_credit.c | 18 ++++++++---------
 src/lib/testing_api_cmd_bank_history_debit.c  | 29 +++++++++++++++------------
 2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/src/lib/testing_api_cmd_bank_history_credit.c 
b/src/lib/testing_api_cmd_bank_history_credit.c
index be820ab4..fbabc77b 100644
--- a/src/lib/testing_api_cmd_bank_history_credit.c
+++ b/src/lib/testing_api_cmd_bank_history_credit.c
@@ -507,15 +507,6 @@ history_cb (void *cls,
   struct HistoryState *hs = is->commands[is->ip].cls;
 
   (void) row_id;
-  if (MHD_HTTP_OK != http_status)
-  {
-    hs->hh = NULL;
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unwanted response code from /history: %u\n",
-                http_status);
-    TALER_TESTING_interpreter_fail (is);
-    return GNUNET_SYSERR;
-  }
   if (NULL == details)
   {
     hs->hh = NULL;
@@ -541,6 +532,15 @@ history_cb (void *cls,
     TALER_TESTING_interpreter_next (is);
     return GNUNET_OK;
   }
+  if (MHD_HTTP_OK != http_status)
+  {
+    hs->hh = NULL;
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Unwanted response code from /history: %u\n",
+                http_status);
+    TALER_TESTING_interpreter_fail (is);
+    return GNUNET_SYSERR;
+  }
 
   /* check current element */
   if (GNUNET_OK != check_result (is,
diff --git a/src/lib/testing_api_cmd_bank_history_debit.c 
b/src/lib/testing_api_cmd_bank_history_debit.c
index 267ea143..c98eb26a 100644
--- a/src/lib/testing_api_cmd_bank_history_debit.c
+++ b/src/lib/testing_api_cmd_bank_history_debit.c
@@ -205,8 +205,10 @@ build_history (struct TALER_TESTING_Interpreter *is,
     add_incoming_cmd = TALER_TESTING_interpreter_lookup_command
                          (is, hs->start_row_reference);
     GNUNET_assert (NULL != add_incoming_cmd);
-    GNUNET_assert (GNUNET_OK == TALER_TESTING_get_trait_uint64
-                     (add_incoming_cmd, 0, &row_id_start));
+    GNUNET_assert (GNUNET_OK ==
+                   TALER_TESTING_get_trait_uint64 (add_incoming_cmd,
+                                                   0,
+                                                   &row_id_start));
   }
 
   GNUNET_assert (0 != hs->num_results);
@@ -330,8 +332,9 @@ build_history (struct TALER_TESTING_Interpreter *is,
     const char *credit_account;
     const char *debit_account;
 
-    if (GNUNET_OK != TALER_TESTING_GET_TRAIT_ROW_ID
-          (pos, &row_id))
+    if (GNUNET_OK !=
+        TALER_TESTING_GET_TRAIT_ROW_ID (pos,
+                                        &row_id))
       continue;
 
     if (NULL != row_id_start)
@@ -511,15 +514,6 @@ history_cb (void *cls,
   struct HistoryState *hs = is->commands[is->ip].cls;
 
   (void) row_id;
-  if (MHD_HTTP_OK != http_status)
-  {
-    hs->hh = NULL;
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unwanted response code from /history: %u\n",
-                http_status);
-    TALER_TESTING_interpreter_fail (is);
-    return GNUNET_SYSERR;
-  }
   if (NULL == details)
   {
     hs->hh = NULL;
@@ -545,6 +539,15 @@ history_cb (void *cls,
     TALER_TESTING_interpreter_next (is);
     return GNUNET_OK;
   }
+  if (MHD_HTTP_OK != http_status)
+  {
+    hs->hh = NULL;
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Unwanted response code from /history: %u\n",
+                http_status);
+    TALER_TESTING_interpreter_fail (is);
+    return GNUNET_SYSERR;
+  }
 
   /* check current element */
   if (GNUNET_OK != check_result (is,

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



reply via email to

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