Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
dea8b62b
Commit
dea8b62b
authored
Oct 24, 2018
by
Francis Dupont
Browse files
[153-netconf-agent] Make netconf more robust
parent
14a9deda
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/netconf/netconf.cc
View file @
dea8b62b
...
@@ -106,7 +106,7 @@ NetconfAgent::~NetconfAgent() {
...
@@ -106,7 +106,7 @@ NetconfAgent::~NetconfAgent() {
void
void
NetconfAgent
::
init
(
NetconfCfgMgrPtr
cfg_mgr
)
{
NetconfAgent
::
init
(
NetconfCfgMgrPtr
cfg_mgr
)
{
if
(
NetconfProcess
::
global_shut_down_flag
)
{
if
(
NetconfProcess
::
global_shut_down_flag
||
!
cfg_mgr
)
{
return
;
return
;
}
}
const
CfgServersMapPtr
&
servers
=
const
CfgServersMapPtr
&
servers
=
...
...
src/bin/netconf/netconf_process.cc
View file @
dea8b62b
...
@@ -47,10 +47,18 @@ NetconfProcess::run() {
...
@@ -47,10 +47,18 @@ NetconfProcess::run() {
try
{
try
{
// Initialize sysrepo.
// Initialize sysrepo.
agent_
.
initSysrepo
();
if
(
!
shouldShutdown
())
{
agent_
.
initSysrepo
();
}
// Initialize netconf agent in a thread.
// Initialize netconf agent in a thread.
Thread
th
([
this
]()
{
agent_
.
init
(
getNetconfCfgMgr
());
});
NetconfCfgMgrPtr
cfg_mgr
;
if
(
!
shouldShutdown
())
{
cfg_mgr
=
getNetconfCfgMgr
();
}
// Initialize the agent in a thread.
Thread
th
([
cfg_mgr
]()
{
agent_
.
init
(
cfg_mgr
);
});
// Let's process incoming data or expiring timers in a loop until
// Let's process incoming data or expiring timers in a loop until
// shutdown condition is detected.
// shutdown condition is detected.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment