Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flexisip
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
flexisip
Commits
ab63a877
Commit
ab63a877
authored
Dec 16, 2014
by
François Grisez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conf reading issue
parent
603eef5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
monitor.cc
src/monitor.cc
+10
-16
No files found.
src/monitor.cc
View file @
ab63a877
...
...
@@ -18,6 +18,7 @@
#include "monitor.hh"
#include "configmanager.hh"
#include "agent.hh"
using
namespace
std
;
...
...
@@ -41,27 +42,20 @@ Monitor::Init::Init() {
}
void
Monitor
::
exec
(
int
socket
)
{
GenericStruct
*
monitorParams
;
try
{
monitorParams
=
GenericManager
::
get
()
->
getRoot
()
->
get
<
GenericStruct
>
(
"monitor"
);
}
catch
(
FlexisipException
&
e
)
{
LOGE
(
e
.
str
().
c_str
());
exit
(
-
1
);
}
// Create a temporary agent to load all modules
su_root_t
*
root
=
NULL
;
shared_ptr
<
Agent
>
a
=
make_shared
<
Agent
>
(
root
);
GenericManager
::
get
()
->
loadStrict
();
GenericStruct
*
monitorParams
=
GenericManager
::
get
()
->
getRoot
()
->
get
<
GenericStruct
>
(
"monitor"
);
string
interval
=
monitorParams
->
get
<
ConfigValue
>
(
"test-interval"
)
->
get
();
string
logfile
=
monitorParams
->
get
<
ConfigString
>
(
"logfile"
)
->
read
();
string
port
=
monitorParams
->
get
<
ConfigValue
>
(
"switch-port"
)
->
get
();
GenericStruct
*
authParams
;
try
{
authParams
=
GenericManager
::
get
()
->
getRoot
()
->
get
<
GenericStruct
>
(
"module::Authentication"
);
}
catch
(
FlexisipException
&
e
){
LOGE
(
e
.
str
().
c_str
());
exit
(
-
1
);
}
list
<
string
>
identities
=
monitorParams
->
get
<
ConfigStringList
>
(
"identities"
)
->
read
();
GenericStruct
*
authParams
=
GenericManager
::
get
()
->
getRoot
()
->
get
<
GenericStruct
>
(
"module::Authentication"
);
list
<
string
>
trustedHosts
=
authParams
->
get
<
ConfigStringList
>
(
"trusted-hosts"
)
->
read
();
list
<
string
>
identities
=
monitorParams
->
get
<
ConfigStringList
>
(
"identities"
)
->
read
();
if
(
identities
.
size
()
!=
trustedHosts
.
size
())
{
LOGE
(
"Flexisip monitor: there is not as many SIP indentities as trusted-hosts"
);
exit
(
-
1
);
...
...
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