<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7830">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Alexander Traud: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">General: Silence modules on (un)load.<br><br>Some (normally optional) modules created notices, warnings, and even errors<br>in normal situations like (un)load. This cluttered the command-line interface<br>(CLI) on start and while stopping gracefully. However, when an user went for<br>the script './contrib/scripts/install_prereq', those modules get compiled-in<br>because their prerequisites were met at compile time. Furthermore, because of<br>ASTERISK_27475, the former talkative module 'res_curl' is built as side-effect.<br><br>ASTERISK-27553<br><br>Change-Id: I9f105f46d72553994e820679bfde3478a551b281<br>---<br>M pbx/pbx_lua.c<br>M res/res_curl.c<br>M res/res_odbc.c<br>3 files changed, 5 insertions(+), 28 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c<br>index 655d2df..e1f5590 100644<br>--- a/pbx/pbx_lua.c<br>+++ b/pbx/pbx_lua.c<br>@@ -1636,9 +1636,6 @@<br> res = AST_MODULE_LOAD_DECLINE;<br> }<br> <br>- if (!res) {<br>- ast_log(LOG_NOTICE, "Lua PBX Switch loaded.\n");<br>- }<br> lua_close(L);<br> return res;<br> }<br>@@ -1648,7 +1645,6 @@<br> ast_context_destroy(NULL, registrar);<br> ast_unregister_switch(&lua_switch);<br> lua_free_extensions();<br>- ast_log(LOG_NOTICE, "Lua PBX Switch unloaded.\n");<br> return 0;<br> }<br> <br>diff --git a/res/res_curl.c b/res/res_curl.c<br>index e5eaa7d..aa10eff 100644<br>--- a/res/res_curl.c<br>+++ b/res/res_curl.c<br>@@ -61,7 +61,9 @@<br> /* If the dependent modules are still in memory, forbid unload */<br> for (i = 0; i < ARRAY_LEN(dependents); i++) {<br> if (ast_module_check(dependents[i])) {<br>- ast_log(LOG_ERROR, "%s (dependent module) is still loaded. Cannot unload res_curl.so\n", dependents[i]);<br>+ if (!ast_shutting_down()) {<br>+ ast_log(LOG_WARNING, "%s (dependent module) is still loaded. Cannot unload res_curl.so\n", dependents[i]);<br>+ }<br> res = -1;<br> }<br> }<br>@@ -74,19 +76,9 @@<br> return res;<br> }<br> <br>-/*!<br>- * \brief Load the module<br>- *<br>- * Module loading including tests for configuration or dependencies.<br>- * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,<br>- * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails<br>- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the<br>- * configuration file or other non-critical problem return<br>- * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.<br>- */<br> static int load_module(void)<br> {<br>- int res = 0;<br>+ int res = AST_MODULE_LOAD_SUCCESS;<br> <br> if (curl_global_init(CURL_GLOBAL_ALL)) {<br> ast_log(LOG_ERROR, "Unable to initialize the cURL library. Cannot load res_curl.so\n");<br>diff --git a/res/res_odbc.c b/res/res_odbc.c<br>index 73af220..7395449 100644<br>--- a/res/res_odbc.c<br>+++ b/res/res_odbc.c<br>@@ -1068,16 +1068,6 @@<br> return -1;<br> }<br> <br>-/*!<br>- * \brief Load the module<br>- *<br>- * Module loading including tests for configuration or dependencies.<br>- * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,<br>- * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails<br>- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the<br>- * configuration file or other non-critical problem return<br>- * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.<br>- */<br> static int load_module(void)<br> {<br> if (!(class_container = ao2_container_alloc(1, null_hash_fn, ao2_match_by_addr)))<br>@@ -1086,8 +1076,7 @@<br> return AST_MODULE_LOAD_DECLINE;<br> ast_cli_register_multiple(cli_odbc, ARRAY_LEN(cli_odbc));<br> ast_data_register_multiple(odbc_providers, ARRAY_LEN(odbc_providers));<br>- ast_log(LOG_NOTICE, "res_odbc loaded.\n");<br>- return 0;<br>+ return AST_MODULE_LOAD_SUCCESS;<br> }<br> <br> AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "ODBC resource",<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7830">change 7830</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7830"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I9f105f46d72553994e820679bfde3478a551b281 </div>
<div style="display:none"> Gerrit-Change-Number: 7830 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>