diff options
author | Mark Spencer <markster@digium.com> | 2003-12-09 23:55:17 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-12-09 23:55:17 +0000 |
commit | 2f69b332d8e7b9fbd52f837f477da8abd86e57d8 (patch) | |
tree | e5e5eb37bd50d00a0215049ce584d248a60da5df /channels/chan_nbs.c | |
parent | 23cfe10d94c4583454e5fa53908581d6fc63f5ff (diff) |
Cleanup unload calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_nbs.c')
-rwxr-xr-x | channels/chan_nbs.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c index 0cf50f56c..cd40ce167 100755 --- a/channels/chan_nbs.c +++ b/channels/chan_nbs.c @@ -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; |