From: Joshua Colp Date: Sat, 15 Nov 2014 18:59:47 +0000 (+0000) Subject: chan_motif / chan_pjsip: Fix incorrect "No such module" messages when reloading. X-Git-Tag: 12.8.0-rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cc4fdeb8629398fc2dc7688b306bc35463b3e0f;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@427981 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_motif.c b/channels/chan_motif.c index b69371acfd..a8cb75b4c2 100644 --- a/channels/chan_motif.c +++ b/channels/chan_motif.c @@ -2785,7 +2785,11 @@ end: /*! \brief Reload module */ 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 */ diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index 7819a910e8..c5528a75b5 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -2259,12 +2259,6 @@ end: return AST_MODULE_LOAD_FAILURE; } -/*! \brief Reload module */ -static int reload(void) -{ - return -1; -} - /*! \brief Unload the PJSIP channel from Asterisk */ static int unload_module(void) { @@ -2288,6 +2282,5 @@ static int unload_module(void) AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Channel Driver", .load = load_module, .unload = unload_module, - .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, );