Implement "accept_config" attribute.

Refs #6191
This commit is contained in:
Gunnar Beutner 2014-05-15 10:13:32 +02:00
parent 282386e122
commit dcbe7e1dfd
3 changed files with 9 additions and 0 deletions

View File

@ -158,6 +158,11 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin& origin, const Dictio
if (!origin.FromZone || !Zone::GetLocalZone()->IsChildOf(origin.FromZone))
return Empty;
ApiListener::Ptr listener = ApiListener::GetInstance();
if (!listener || !listener->GetAcceptConfig())
return Empty;
Dictionary::Ptr update = params->Get("update");
bool configChange = false;

View File

@ -16,6 +16,8 @@ class ApiListener : DynamicObject
default {{{ return "5665"; }}}
};
[config] bool accept_config;
[state] double log_message_timestamp;
String identity;

View File

@ -31,6 +31,8 @@
%attribute %string "bind_host",
%attribute %string "bind_port",
%attribute %number "accept_config"
}
%type Endpoint {