aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_nbs.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-09 23:55:17 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-09 23:55:17 +0000
commitdcfebf7bf6b94894f65fd5c6241cd639bdaaf110 (patch)
treee5e5eb37bd50d00a0215049ce584d248a60da5df /channels/chan_nbs.c
parent5d20155225cb149d6326defea641e47809d67fe6 (diff)
Cleanup unload calls
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1850 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_nbs.c')
-rwxr-xr-xchannels/chan_nbs.c23
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;