Remove Rhizome enabled test from Keyring REST API

This commit is contained in:
Andrew Bettison 2015-09-28 09:49:29 +09:30
parent 6123503c15
commit a276fc9d28
2 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,6 @@ static HTTP_HANDLER restful_keyring_set;
static int restful_keyring_(httpd_request *r, const char *remainder)
{
r->http.response.header.content_type = CONTENT_TYPE_JSON;
if (!is_rhizome_http_enabled())
return 403;
int ret = authorize_restful(&r->http);
if (ret)
return ret;

View File

@ -583,6 +583,8 @@ void cf_on_config_change()
TIME_MS_NEVER_WILL,
now+config.server.config_reload_interval_ms+100);
// Open the Rhizome database immediately if Rhizome is enabled and close it if disabled; this
// cannot be deferred because is_rhizome_http_enabled() only returns true if the database is open.
if (config.rhizome.enable){
rhizome_opendb();
RESCHEDULE(&ALARM_STRUCT(rhizome_clean_db), now + 30*60*1000, TIME_MS_NEVER_WILL, TIME_MS_NEVER_WILL);