gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: fix enum confusion


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: fix enum confusion
Date: Sat, 09 Dec 2017 23:46:28 +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 23cb1d4  fix enum confusion
23cb1d4 is described below

commit 23cb1d46a8b12544735fb420318e5c350fa99bf8
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Dec 9 23:46:05 2017 +0100

    fix enum confusion
---
 src/exchangedb/plugin_exchangedb_postgres.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index 3db1d4c..36ae3e5 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -3203,7 +3203,7 @@ struct GetRevealContext
   /**
    * Set to an error code if we ran into trouble.
    */
-  enum TALER_ErrorCode ec;
+  enum GNUNET_DB_QueryStatus qs;
 };
 
 
@@ -3250,13 +3250,13 @@ add_revealed_coins (void *cls,
                                   i))
     {
       GNUNET_break (0);
-      grctx->ec = GNUNET_DB_STATUS_HARD_ERROR;
+      grctx->qs = GNUNET_DB_STATUS_HARD_ERROR;
       return;
     }
     if (off != i)
     {
       GNUNET_break (0);
-      grctx->ec = GNUNET_DB_STATUS_HARD_ERROR;
+      grctx->qs = GNUNET_DB_STATUS_HARD_ERROR;
       return;
     }
   }
@@ -3318,6 +3318,15 @@ postgres_get_refresh_reveal (void *cls,
   default: /* can have more than one result */
     break;
   }
+  switch (grctx.qs)
+  {
+  case GNUNET_DB_STATUS_HARD_ERROR:
+  case GNUNET_DB_STATUS_SOFT_ERROR:
+    goto cleanup;
+  case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+  case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: /* should be impossible */
+    break;
+  }
 
   /* now also get the transfer keys (public and private) */
   qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,

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



reply via email to

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