diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-19 14:54:53 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-19 14:54:53 +0200 |
commit | 6b93d09362dd66cb43301019d5ded7292d64a64b (patch) | |
tree | 4fcc7557e71094b70089e4a4986b384686a1c7d9 /src/backend/taler-merchant-httpd_private-post-instances.c | |
parent | 212298abf8ced772d55598bf9a869bd6d63aea3e (diff) |
implement GET /products
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-instances.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-instances.c | 13 |
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); |