diff options
author | Alexandr Anikin <may@telecom-service.ru> | 2013-12-18 19:10:42 +0000 |
---|---|---|
committer | Alexandr Anikin <may@telecom-service.ru> | 2013-12-18 19:10:42 +0000 |
commit | e23b8d19a49d4ee4faf3dc167ddb7ba7afe36a46 (patch) | |
tree | c1c83b879086216d927978ec03ee74e4e9cd6078 /addons | |
parent | ec79aabdb9a27f16b922f0e8a7fcf30eb5462d2a (diff) |
Implement module reload command for chan_ooh323
(close issue ASTERISK-22817)
Patches:
ooh323_module_reload.patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'addons')
-rw-r--r-- | addons/chan_ooh323.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 56a1b7b68..ff0a030ad 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -3896,6 +3896,22 @@ static int load_module(void) return 0; } +static int reload_module(void) +{ + ast_mutex_lock(&h323_reload_lock); + if (h323_reloading) { + ast_verb(0, "Previous OOH323 reload not yet done\n"); + } else { + h323_reloading = 1; + } + ast_mutex_unlock(&h323_reload_lock); + restart_monitor(); + + if (gH323Debug) + ast_verb(0, "+++ ooh323_reload\n"); + + return 0; +} static void *do_monitor(void *data) { @@ -5180,4 +5196,9 @@ void ast_ooh323c_exit() } #endif -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Objective Systems H323 Channel"); +AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Objective Systems H323 Channel", + .load = load_module, + .unload = unload_module, + .reload = reload_module, + .load_pri = AST_MODPRI_CHANNEL_DRIVER + ); |