Added setting to execute account operations on reload.
git-svn-id: http://voip.null.ro/svn/yate@6414 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
51b6b1d2f2
commit
5fadec52f2
|
@ -84,6 +84,10 @@
|
||||||
; addr: Local address for H323 listener (leave it empty to listen on all interfaces)
|
; addr: Local address for H323 listener (leave it empty to listen on all interfaces)
|
||||||
; port: Local port for H323 listener
|
; port: Local port for H323 listener
|
||||||
|
|
||||||
|
;[general]
|
||||||
|
; Only in [general] if auto_oper is not empty on initialize the file is reloaded and each operation executed
|
||||||
|
;auto_oper=logout,login
|
||||||
|
|
||||||
[test_sip]
|
[test_sip]
|
||||||
enabled=no
|
enabled=no
|
||||||
protocol=sip
|
protocol=sip
|
||||||
|
|
|
@ -270,6 +270,21 @@ void AccFilePlugin::initialize()
|
||||||
Engine::install(new CmdHandler);
|
Engine::install(new CmdHandler);
|
||||||
Engine::install(new HelpHandler);
|
Engine::install(new HelpHandler);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
String oper = s_cfg.getValue("general","auto_oper");
|
||||||
|
if (oper) {
|
||||||
|
s_mutex.lock();
|
||||||
|
s_cfg.load();
|
||||||
|
oper = s_cfg.getValue("general","auto_oper");
|
||||||
|
s_mutex.unlock();
|
||||||
|
ObjList* list = oper.split(',',false);
|
||||||
|
for (ObjList* l = list->skipNull(); l; l = l->skipNext()) {
|
||||||
|
oper = *static_cast <const String*>(l->get());
|
||||||
|
if (oper.trimSpaces())
|
||||||
|
emitAccounts(oper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // anonymous namespace
|
}; // anonymous namespace
|
||||||
|
|
Loading…
Reference in New Issue