More local.conf stuff.
This commit is contained in:
parent
cd339486b7
commit
33728840ec
2 changed files with 41 additions and 0 deletions
|
@ -118,6 +118,29 @@ NodeConfig::~NodeConfig()
|
|||
_writeLocalConfig();
|
||||
}
|
||||
|
||||
void NodeConfig::putLocalConfig(const std::string &key,const char *value)
|
||||
{
|
||||
Mutex::Lock _l(_localConfig_m);
|
||||
_localConfig[key] = value;
|
||||
_writeLocalConfig();
|
||||
}
|
||||
|
||||
void NodeConfig::putLocalConfig(const std::string &key,const std::string &value)
|
||||
{
|
||||
Mutex::Lock _l(_localConfig_m);
|
||||
_localConfig[key] = value;
|
||||
_writeLocalConfig();
|
||||
}
|
||||
|
||||
std::string NodeConfig::getLocalConfig(const std::string &key) const
|
||||
{
|
||||
Mutex::Lock _l(_localConfig_m);
|
||||
Dictionary::const_iterator i(_localConfig.find(key));
|
||||
if (i == _localConfig.end())
|
||||
return std::string();
|
||||
return i->second;
|
||||
}
|
||||
|
||||
void NodeConfig::clean()
|
||||
{
|
||||
Mutex::Lock _l(_networks_m);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue