mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Cleanup unload calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -252,27 +252,30 @@ static struct ast_channel *nbs_request(char *type, int format, void *data)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static int __unload_module(void)
|
||||
{
|
||||
/* First, take us out of the channel loop */
|
||||
ast_channel_unregister(type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int unload_module(void)
|
||||
{
|
||||
return __unload_module();
|
||||
}
|
||||
|
||||
int load_module()
|
||||
{
|
||||
/* Make sure we can register our Adtranphone channel type */
|
||||
if (ast_channel_register(type, tdesc,
|
||||
AST_FORMAT_SLINEAR, nbs_request)) {
|
||||
ast_log(LOG_ERROR, "Unable to register channel class %s\n", type);
|
||||
unload_module();
|
||||
__unload_module();
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int unload_module()
|
||||
{
|
||||
/* First, take us out of the channel loop */
|
||||
ast_channel_unregister(type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int usecount()
|
||||
{
|
||||
int res;
|
||||
|
Reference in New Issue
Block a user