summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-12-06 12:51:01 -0300
committerSebastian <sebasjm@gmail.com>2021-12-06 12:51:01 -0300
commit3015d13f6e6d11faa8348772756b1a56931de4fd (patch)
tree090479b37747d0faba831a580a7d7937ab3163b3 /src/backend
parent8178e10981eaba0a5f08f6f2681861d105f8b0c7 (diff)
downloadmerchant-3015d13f6e6d11faa8348772756b1a56931de4fd.tar.gz
merchant-3015d13f6e6d11faa8348772756b1a56931de4fd.tar.bz2
merchant-3015d13f6e6d11faa8348772756b1a56931de4fd.zip
fixing: unable to use default instance if it was not the first created
if the first instance created is not the default instance then the next access to the default instance is not possible since: * default_auth is set to null in taler-merchant-httpd_private-post-instances:463 * TMH_lookup_instance will not find default instance in taler-merchant-httpd:1153 * auth_ok will be always false in line 1385 - multihashmap_size > 0 - default_auth == NULL - hc->instance == NULL disabling any instance creation, even default instance until restart restarting the service will load the default_auth again allowing the access to the default instance again
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-instances.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c
index 71be2673..0ab7fce6 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -453,8 +453,13 @@ retry:
TMH_reload_instances (mi->settings.id);
}
GNUNET_JSON_parse_free (spec);
- GNUNET_free (TMH_default_auth); /* clear it: user just either created default
- instance or it should already be NULL */
+ if (0 == strcmp (is.id,
+ "default"))
+ {
+ GNUNET_free (TMH_default_auth); /* clear it if the default instance was
+ created */
+ }
+
return TALER_MHD_reply_static (connection,
MHD_HTTP_NO_CONTENT,
NULL,