Refuse to reload on active channels.

This commit is contained in:
MelwareDE 2012-11-15 10:37:50 +00:00
parent 850e8c24d1
commit 20eef6a35a
2 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,7 @@ CHANGES
HEAD
------------------
- refuse to reload on active channels
chan_capi-1.1.6

View File

@ -9021,12 +9021,16 @@ int load_module(void)
#ifdef CC_AST_HAS_VERSION_1_4
static int reload(void)
{
int ret;
int ret = 0;
cc_verbose(1, 0, VERBOSE_PREFIX_1 "config reload\n");
if (usecnt) {
cc_verbose(1, 0, VERBOSE_PREFIX_1 "chan_capi refused reload because of active channels\n");
} else {
cc_verbose(1, 0, VERBOSE_PREFIX_1 "chan_capi reload\n");
unload_module();
ret = load_module();
unload_module();
ret = load_module();
}
return ret;
}