summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-instances.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-instances.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-instances.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c
index 18466097..75c5b2e6 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -363,8 +363,7 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh,
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
TMH_db->rollback (TMH_db->cls);
- // TODO: only on soft error do:
- continue;
+ goto retry;
}
for (struct TMH_WireMethod *wm = wm_head;
NULL != wm;
@@ -393,13 +392,13 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh,
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
TMH_db->rollback (TMH_db->cls);
- // TODO: only on soft error do:
- continue;
+ goto retry;
}
qs = TMH_db->commit (TMH_db->cls);
- if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs)
- break; /* success! */
- }
+retry:
+ if (GNUNET_DB_STATUS_SOFT_ERROR != qs)
+ break; /* success! -- or hard failure */
+ } /* for .. MAX_RETRIES */
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
GNUNET_JSON_parse_free (spec);