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
c007f01b
Commit
c007f01b
authored
6 years ago
by
George Joseph
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "codec_speex.c: Cleanup module loading to DECLINE and not FAILURE." into 13
parents
674a8824
f7cc6bad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codecs/codec_speex.c
+12
-14
12 additions, 14 deletions
codecs/codec_speex.c
with
12 additions
and
14 deletions
codecs/codec_speex.c
+
12
−
14
View file @
c007f01b
...
@@ -603,39 +603,37 @@ static int reload(void)
...
@@ -603,39 +603,37 @@ static int reload(void)
static
int
unload_module
(
void
)
static
int
unload_module
(
void
)
{
{
int
res
=
0
;
ast_unregister_translator
(
&
speextolin
);
ast_unregister_translator
(
&
lintospeex
);
res
|=
ast_unregister_translator
(
&
speextolin
);
ast_unregister_translator
(
&
speexwbtolin16
);
res
|=
ast_unregister_translator
(
&
lintospeex
);
ast_unregister_translator
(
&
lin16tospeexwb
);
res
|=
ast_unregister_translator
(
&
speexwbtolin16
);
ast_unregister_translator
(
&
speexuwbtolin32
);
res
|=
ast_unregister_translator
(
&
lin16tospeexwb
);
ast_unregister_translator
(
&
lin32tospeexuwb
);
res
|=
ast_unregister_translator
(
&
speexuwbtolin32
);
res
|=
ast_unregister_translator
(
&
lin32tospeexuwb
);
return
0
;
return
res
;
}
}
static
int
load_module
(
void
)
static
int
load_module
(
void
)
{
{
int
res
=
0
;
int
res
=
0
;
if
(
parse_config
(
0
))
if
(
parse_config
(
0
))
{
return
AST_MODULE_LOAD_DECLINE
;
return
AST_MODULE_LOAD_DECLINE
;
}
/* XXX It is most likely a bug in this module if we fail to register a translator */
res
|=
ast_register_translator
(
&
speextolin
);
res
|=
ast_register_translator
(
&
speextolin
);
res
|=
ast_register_translator
(
&
lintospeex
);
res
|=
ast_register_translator
(
&
lintospeex
);
res
|=
ast_register_translator
(
&
speexwbtolin16
);
res
|=
ast_register_translator
(
&
speexwbtolin16
);
res
|=
ast_register_translator
(
&
lin16tospeexwb
);
res
|=
ast_register_translator
(
&
lin16tospeexwb
);
res
|=
ast_register_translator
(
&
speexuwbtolin32
);
res
|=
ast_register_translator
(
&
speexuwbtolin32
);
res
|=
ast_register_translator
(
&
lin32tospeexuwb
);
res
|=
ast_register_translator
(
&
lin32tospeexuwb
);
if
(
res
)
{
if
(
res
)
{
unload_module
();
unload_module
();
return
res
;
return
AST_MODULE_LOAD_DECLINE
;
}
}
return
res
;
return
AST_MODULE_LOAD_SUCCESS
;
}
}
AST_MODULE_INFO
(
ASTERISK_GPL_KEY
,
AST_MODFLAG_DEFAULT
,
"Speex Coder/Decoder"
,
AST_MODULE_INFO
(
ASTERISK_GPL_KEY
,
AST_MODFLAG_DEFAULT
,
"Speex Coder/Decoder"
,
...
...
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