fix enum confusion

This commit is contained in:
Christian Grothoff 2017-12-09 23:46:05 +01:00
parent 1d40d2973c
commit 23cb1d46a8
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -3203,7 +3203,7 @@ struct GetRevealContext
/** /**
* Set to an error code if we ran into trouble. * 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)) i))
{ {
GNUNET_break (0); GNUNET_break (0);
grctx->ec = GNUNET_DB_STATUS_HARD_ERROR; grctx->qs = GNUNET_DB_STATUS_HARD_ERROR;
return; return;
} }
if (off != i) if (off != i)
{ {
GNUNET_break (0); GNUNET_break (0);
grctx->ec = GNUNET_DB_STATUS_HARD_ERROR; grctx->qs = GNUNET_DB_STATUS_HARD_ERROR;
return; return;
} }
} }
@ -3318,6 +3318,15 @@ postgres_get_refresh_reveal (void *cls,
default: /* can have more than one result */ default: /* can have more than one result */
break; 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) */ /* now also get the transfer keys (public and private) */
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn, qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,