summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 14:26:07 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 14:57:03 +0200
commitcdde19794f49b5b022b0987b1d99edc7910f4d00 (patch)
treeb68113e0bfb37216bcbfa3f26daccc1e844b0009 /src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c
parent76cf111084c13d5dc2d4ba686ecbbdeb8ff1ade9 (diff)
downloadmerchant-cdde19794f49b5b022b0987b1d99edc7910f4d00.tar.gz
merchant-cdde19794f49b5b022b0987b1d99edc7910f4d00.tar.bz2
merchant-cdde19794f49b5b022b0987b1d99edc7910f4d00.zip
fix #6946: reload merchant instance settings from DB on change
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c b/src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c
index 17316348..eef710b6 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances-ID-auth.c
@@ -108,25 +108,25 @@ post_instances_ID_auth (struct TMH_MerchantInstance *mi,
switch (qs)
{
- case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
- /* Instance got purged. */
- TMH_db->rollback (TMH_db->cls);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_UNAUTHORIZED,
- TALER_EC_GENERIC_DB_COMMIT_FAILED,
- NULL);
- case GNUNET_DB_STATUS_SOFT_ERROR:
- TMH_db->rollback (TMH_db->cls);
- goto retry;
- case GNUNET_DB_STATUS_HARD_ERROR:
- TMH_db->rollback (TMH_db->cls);
- return TALER_MHD_reply_with_error (connection,
+ case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ /* Instance got purged. */
+ TMH_db->rollback (TMH_db->cls);
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_UNAUTHORIZED,
+ TALER_EC_GENERIC_DB_COMMIT_FAILED,
+ NULL);
+ case GNUNET_DB_STATUS_SOFT_ERROR:
+ TMH_db->rollback (TMH_db->cls);
+ goto retry;
+ case GNUNET_DB_STATUS_HARD_ERROR:
+ TMH_db->rollback (TMH_db->cls);
+ return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GENERIC_DB_FETCH_FAILED,
NULL);
- case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
- /* Success! */
- break;
+ case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
+ /* Success! */
+ break;
}
if (GNUNET_OK !=
@@ -183,6 +183,7 @@ retry:
for the default instance. */
GNUNET_assert (NULL == TMH_default_auth);
}
+ TMH_reload_instances (mi->settings.id);
return TALER_MHD_reply_static (connection,
MHD_HTTP_NO_CONTENT,
NULL,