mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
chan_motif / chan_pjsip: Fix incorrect "No such module" messages when reloading.
For chan_motif the direct return value of the underlying config options framework was passed back. This can relay various states which the module loader would not interpet as success. It has been changed so only on errors will it report back an error. For chan_pjsip the code implemented a dummy reload function which always returned an error. This has been removed as all configuration is held within res_pjsip instead. ASTERISK-23651 #close Reported by: Rusty Newton ........ Merged revisions 427981 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427982 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2801,7 +2801,11 @@ end:
|
|||||||
/*! \brief Reload module */
|
/*! \brief Reload module */
|
||||||
static int reload(void)
|
static int reload(void)
|
||||||
{
|
{
|
||||||
return aco_process_config(&cfg_info, 1);
|
if (aco_process_config(&cfg_info, 1) == ACO_PROCESS_ERROR) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Unload the jingle channel from Asterisk */
|
/*! \brief Unload the jingle channel from Asterisk */
|
||||||
|
@@ -2341,12 +2341,6 @@ end:
|
|||||||
return AST_MODULE_LOAD_FAILURE;
|
return AST_MODULE_LOAD_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Reload module */
|
|
||||||
static int reload(void)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! \brief Unload the PJSIP channel from Asterisk */
|
/*! \brief Unload the PJSIP channel from Asterisk */
|
||||||
static int unload_module(void)
|
static int unload_module(void)
|
||||||
{
|
{
|
||||||
@@ -2372,6 +2366,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Channel Driver"
|
|||||||
.support_level = AST_MODULE_SUPPORT_CORE,
|
.support_level = AST_MODULE_SUPPORT_CORE,
|
||||||
.load = load_module,
|
.load = load_module,
|
||||||
.unload = unload_module,
|
.unload = unload_module,
|
||||||
.reload = reload,
|
|
||||||
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
|
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user