aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-18 20:24:13 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-18 20:24:13 +0000
commitc3dd782f95f809da02da9a4c2b663264136fef33 (patch)
tree86d537c19e5beeabc35e08694ff786d070738950 /res
parent8c54673dbab7ca7680382d4cd70f668b1dcb48bd (diff)
Add a similar dependency on SMDI for voicemail as already exists for ADSI.
(closes issue #14846) Reported by: pj Patches: 20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@195366 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_smdi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c
index e3da188c9..4c9427720 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -1337,6 +1337,8 @@ static struct ast_custom_function smdi_msg_function = {
.read = smdi_msg_read,
};
+static int unload_module(void);
+
static int load_module(void)
{
int res;
@@ -1354,8 +1356,10 @@ static int load_module(void)
/* load the config and start the listener threads*/
res = smdi_load(0);
if (res < 0) {
+ unload_module();
return res;
} else if (res == 1) {
+ unload_module();
ast_log(LOG_WARNING, "No SMDI interfaces are available to listen on, not starting SMDI listener.\n");
return AST_MODULE_LOAD_DECLINE;
}