Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
5ff42a2b
Commit
5ff42a2b
authored
6 years ago
by
George Joseph
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "res_statsd.c: Fix returned reload status."
parents
675d8a46
682f96cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
res/res_statsd.c
+21
-13
21 additions, 13 deletions
res/res_statsd.c
with
21 additions
and
13 deletions
res/res_statsd.c
+
21
−
13
View file @
5ff42a2b
...
...
@@ -316,6 +316,14 @@ static void statsd_shutdown(void)
}
}
static
int
unload_module
(
void
)
{
statsd_shutdown
();
aco_info_destroy
(
&
cfg_info
);
ao2_global_obj_release
(
confs
);
return
0
;
}
static
int
load_module
(
void
)
{
if
(
aco_info_init
(
&
cfg_info
))
{
...
...
@@ -364,34 +372,34 @@ static int load_module(void)
return
AST_MODULE_LOAD_SUCCESS
;
}
if
(
statsd_init
()
!=
0
)
{
aco_info_destroy
(
&
cfg_info
);
if
(
statsd_init
())
{
unload_module
(
);
return
AST_MODULE_LOAD_DECLINE
;
}
return
AST_MODULE_LOAD_SUCCESS
;
}
static
int
unload_module
(
void
)
{
statsd_shutdown
();
aco_info_destroy
(
&
cfg_info
);
ao2_global_obj_release
(
confs
);
return
0
;
}
static
int
reload_module
(
void
)
{
if
(
aco_process_config
(
&
cfg_info
,
1
))
{
switch
(
aco_process_config
(
&
cfg_info
,
1
))
{
case
ACO_PROCESS_OK
:
break
;
case
ACO_PROCESS_UNCHANGED
:
return
AST_MODULE_LOAD_SUCCESS
;
case
ACO_PROCESS_ERROR
:
default:
return
AST_MODULE_LOAD_DECLINE
;
}
if
(
is_enabled
())
{
return
statsd_init
();
if
(
statsd_init
())
{
return
AST_MODULE_LOAD_DECLINE
;
}
}
else
{
statsd_shutdown
();
return
AST_MODULE_LOAD_SUCCESS
;
}
return
AST_MODULE_LOAD_SUCCESS
;
}
/* The priority of this module is set just after realtime, since it loads
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment