[Home]

Summary:ASTERISK-28046: Remove stale nonoptreq references
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2018-09-11 03:43:42Date Closed:2018-09-13 13:07:21
Priority:MajorRegression?No
Status:Closed/CompleteComponents:General
Versions:13.22.0 15.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Since this commit:
{noformat}
commit 9bed50db41690339ca64bdcc6d6bc1c6edfebe4a
Author: David M. Lee <dlee@digium.com>
Date:   Fri Aug 30 13:40:27 2013 +0000

   optional_api: Fix linking problems between modules that export global symbols
{noformat}
the nonoptreq is not being used anymore.

Because no one uses it, it is not updated either and may start to contain stale info.

For instance: Asterisk 13.23 chan_sip contains nonoptreq=res_crypto,res_http_websocket
but only res_http_websocket is actually used.

Test (compile without OPTIONAL_API support in compiler flags):
{noformat}
*CLI> module load chan_sip.so
Unable to load module chan_sip.so
Command 'module load chan_sip.so ' failed.
[2018-09-11 10:34:25] WARNING[29777]: loader.c:583 load_dlopen: Error loading module 'chan_sip.so': /usr/lib/asterisk/modules/chan_sip.so: undefined symbol: ast_websocket_ref
[2018-09-11 10:34:25] WARNING[29777]: loader.c:1182 load_resource: Module 'chan_sip.so' could not be loaded.

*CLI> module load res_http_websocket.so
Loaded res_http_websocket.so
*CLI> module load chan_sip.so
SIP channel loading...
[...]
Loaded chan_sip.so

*CLI> module show
Module                         Description                              Use Count  Status      Support Level
chan_sip.so                    Session Initiation Protocol (SIP)        0          Running              core
res_http_websocket.so          HTTP WebSocket Support                   2          Running          extended
2 modules loaded
{noformat}

As far as I can tell, the res_crypto requirement there is outdated (I did not find any source refs to it in any other channel driver than chan_iax2.c).

I suggest we:
- blank out all the nonoptreq values in the current branches ({{"<unused>"}})
- remove the parameter altogether in master
Comments:By: Asterisk Team (asteriskteam) 2018-09-11 03:43:45.059-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Corey Farrell (coreyfarrell) 2018-09-11 03:54:10.531-0500

FWIW I did some major work on the module loader for 16+, nonoptreq does not exist in 16 or master.  Since nothing actually reads that field in 13/15 I have no objection to removing it from all modules (just leave it in modules.h for ABI reasons).

By: Walter Doekes (wdoekes) 2018-09-11 06:29:31.975-0500

Oh silly me. I did not actually check those branches.

In master there is only this stale documentation ref to the nonoptreq:
{noformat}
* Modules have their own metadata compiled into them in the module info block
* at the end of the file.  This includes dependency information in the
* \c nonoptreq field.
{noformat}

In that case not much needs to be fixed anymore.

By: Joshua C. Colp (jcolp) 2018-09-11 06:40:51.694-0500

Is it just that comment needing to be updated (are you going to submit a change)?

By: Walter Doekes (wdoekes) 2018-09-11 07:25:20.010-0500

Submitted.

By: Friendly Automation (friendly-automation) 2018-09-13 13:07:22.503-0500

Change 10078 merged by Jenkins2:
optional_api: Remove unused nonoptreq fields

[https://gerrit.asterisk.org/10078|https://gerrit.asterisk.org/10078]

By: Friendly Automation (friendly-automation) 2018-09-13 13:08:29.168-0500

Change 10079 merged by Jenkins2:
optional_api: Remove unused nonoptreq fields

[https://gerrit.asterisk.org/10079|https://gerrit.asterisk.org/10079]

By: Friendly Automation (friendly-automation) 2018-09-13 13:08:50.712-0500

Change 10081 merged by Jenkins2:
optional_api: Remove unused nonoptreq fields

[https://gerrit.asterisk.org/10081|https://gerrit.asterisk.org/10081]

By: Friendly Automation (friendly-automation) 2018-09-13 13:09:57.094-0500

Change 10080 merged by George Joseph:
optional_api: Remove unused nonoptreq fields

[https://gerrit.asterisk.org/10080|https://gerrit.asterisk.org/10080]