summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-12-09 23:46:05 +0100
committerChristian Grothoff <christian@grothoff.org>2017-12-09 23:46:05 +0100
commit23cb1d46a8b12544735fb420318e5c350fa99bf8 (patch)
tree8e2c3083bbcb136763397b98e888356b78bf5677 /src/exchangedb/plugin_exchangedb_postgres.c
parent1d40d2973c191c67d49e60f0401d0860fe43b581 (diff)
downloadexchange-23cb1d46a8b12544735fb420318e5c350fa99bf8.tar.gz
exchange-23cb1d46a8b12544735fb420318e5c350fa99bf8.tar.bz2
exchange-23cb1d46a8b12544735fb420318e5c350fa99bf8.zip
fix enum confusion
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 3db1d4c4..36ae3e54 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,