From 4616c6508ab37f6725fb6de11cedf7c3ed01213c Mon Sep 17 00:00:00 2001 From: Walter Doekes <walter+asterisk@wjd.nu> Date: Tue, 11 Sep 2018 14:18:14 +0200 Subject: [PATCH] optional_api: Remove unused nonoptreq fields As they're not actively used, they only grow stale. The moduleinfo field itself is kept in Asterisk 13/15 for ABI compatibility. ASTERISK-28046 #close Change-Id: I8df66a7007f807840414bb348511a8c14c05a9fc --- apps/app_adsiprog.c | 1 - apps/app_getcpeid.c | 1 - apps/app_queue.c | 1 - apps/app_speech_utils.c | 1 - apps/app_stack.c | 1 - apps/app_stasis.c | 1 - apps/app_voicemail.c | 1 - channels/chan_dahdi.c | 1 - channels/chan_iax2.c | 1 - channels/chan_mgcp.c | 1 - channels/chan_sip.c | 1 - funcs/func_aes.c | 1 - include/asterisk/module.h | 5 ++--- pbx/pbx_dundi.c | 1 - res/res_ari.c | 1 - res/res_ari_applications.c | 1 - res/res_ari_asterisk.c | 1 - res/res_ari_bridges.c | 1 - res/res_ari_channels.c | 1 - res/res_ari_device_states.c | 1 - res/res_ari_endpoints.c | 1 - res/res_ari_events.c | 1 - res/res_ari_mailboxes.c | 1 - res/res_ari_playbacks.c | 1 - res/res_ari_recordings.c | 1 - res/res_ari_sounds.c | 1 - res/res_chan_stats.c | 1 - res/res_endpoint_stats.c | 1 - res/res_stasis_answer.c | 1 - res/res_stasis_device_state.c | 1 - res/res_stasis_mailbox.c | 1 - res/res_stasis_playback.c | 1 - res/res_stasis_recording.c | 3 +-- res/res_stasis_snoop.c | 1 - res/res_stasis_test.c | 3 +-- rest-api-templates/res_ari_resource.c.mustache | 1 - tests/test_ari.c | 1 - tests/test_res_stasis.c | 1 - tests/test_stasis_endpoints.c | 1 - 39 files changed, 4 insertions(+), 43 deletions(-) diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c index 2dd226fbde..116b6f80d8 100644 --- a/apps/app_adsiprog.c +++ b/apps/app_adsiprog.c @@ -1613,5 +1613,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Asterisk ADSI Programmin .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, - .nonoptreq = "res_adsi", ); diff --git a/apps/app_getcpeid.c b/apps/app_getcpeid.c index e0b9f12393..7c15f8ec19 100644 --- a/apps/app_getcpeid.c +++ b/apps/app_getcpeid.c @@ -140,5 +140,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Get ADSI CPE ID", .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, - .nonoptreq = "res_adsi", ); diff --git a/apps/app_queue.c b/apps/app_queue.c index 32a979e76f..0c295a35b4 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -11291,5 +11291,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "True Call Queueing", .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_DEVSTATE_CONSUMER, - .nonoptreq = "res_monitor", ); diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c index 339c3161f6..e445705b1e 100644 --- a/apps/app_speech_utils.c +++ b/apps/app_speech_utils.c @@ -1003,5 +1003,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Dialplan Speech Applicat .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_speech", ); diff --git a/apps/app_stack.c b/apps/app_stack.c index 459c06df24..a4c5b04f33 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -1320,5 +1320,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT | AST_MODFLAG_LOAD_ORDER, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, - .nonoptreq = "res_agi", ); diff --git a/apps/app_stasis.c b/apps/app_stasis.c index 81c58e8b0c..4d618106cb 100644 --- a/apps/app_stasis.c +++ b/apps/app_stasis.c @@ -144,5 +144,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Stasis dialplan applicat .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis", ); diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 2be3ae4d0a..2b217e18c5 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -16428,5 +16428,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, tdesc, .load = load_module, .unload = unload_module, .reload = reload, - .nonoptreq = "res_adsi,res_smdi", ); diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 77c6906112..05f20ad446 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -19546,5 +19546,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, tdesc, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, - .nonoptreq = "res_smdi", ); diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 5078b78baa..5a230b60aa 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -14909,5 +14909,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Inter Asterisk eXchan .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, - .nonoptreq = "res_crypto", ); diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 547226c80e..62bb82dc57 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -5025,5 +5025,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Media Gateway Control .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, - .nonoptreq = "res_pktccops", ); diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 34b361c65d..5417658de2 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -35607,5 +35607,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Session Initiation Pr .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, - .nonoptreq = "res_crypto,res_http_websocket", ); diff --git a/funcs/func_aes.c b/funcs/func_aes.c index 2eefb056b1..2962fe71ad 100644 --- a/funcs/func_aes.c +++ b/funcs/func_aes.c @@ -181,5 +181,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "AES dialplan functions", .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_crypto", ); diff --git a/include/asterisk/module.h b/include/asterisk/module.h index bcdb3830f5..d19cb1ffdf 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -338,9 +338,8 @@ struct ast_module_info { * on load. */ unsigned char load_pri; - /*! Modules which should be loaded first, in comma-separated string format. - * These are only required for loading, when the optional_api header file - * detects that the compiler does not support the optional API featureset. */ + /*! Obsolete! This is not used since the optional_api portability rework. + * This field does nothing and will be removed in future version of Asterisk. */ const char *nonoptreq; /*! The support level for the given module */ enum ast_module_support_level support_level; diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index d983795ce6..6b32a31a15 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -5101,5 +5101,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Distributed Universal Nu .load = load_module, .unload = unload_module, .reload = reload, - .nonoptreq = "res_crypto", ); diff --git a/res/res_ari.c b/res/res_ari.c index 8a01809494..c4b7054b44 100644 --- a/res/res_ari.c +++ b/res/res_ari.c @@ -1197,6 +1197,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ .load = load_module, .unload = unload_module, .reload = reload_module, - .nonoptreq = "res_http_websocket", .load_pri = AST_MODPRI_APP_DEPEND, ); diff --git a/res/res_ari_applications.c b/res/res_ari_applications.c index cf700c464e..c3d46c9cc2 100644 --- a/res/res_ari_applications.c +++ b/res/res_ari_applications.c @@ -518,5 +518,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Sta .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_asterisk.c b/res/res_ari_asterisk.c index eb0617b4c7..1d0085e840 100644 --- a/res/res_ari_asterisk.c +++ b/res/res_ari_asterisk.c @@ -1239,5 +1239,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Ast .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_bridges.c b/res/res_ari_bridges.c index 65bf7ed3e7..b761bed7ae 100644 --- a/res/res_ari_bridges.c +++ b/res/res_ari_bridges.c @@ -1565,5 +1565,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Bri .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_channels.c b/res/res_ari_channels.c index f6befcc90d..1edd0857f5 100644 --- a/res/res_ari_channels.c +++ b/res/res_ari_channels.c @@ -2869,5 +2869,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Cha .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c index f393935626..5af09599ae 100644 --- a/res/res_ari_device_states.c +++ b/res/res_ari_device_states.c @@ -349,5 +349,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Dev .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c index d1242c0fbc..4b856f0d83 100644 --- a/res/res_ari_endpoints.c +++ b/res/res_ari_endpoints.c @@ -473,5 +473,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - End .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_events.c b/res/res_ari_events.c index f916d0e4ee..c142b4e465 100644 --- a/res/res_ari_events.c +++ b/res/res_ari_events.c @@ -473,5 +473,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Web .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_mailboxes.c b/res/res_ari_mailboxes.c index 1f6d2cc81b..0230570738 100644 --- a/res/res_ari_mailboxes.c +++ b/res/res_ari_mailboxes.c @@ -355,5 +355,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Mai .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_playbacks.c b/res/res_ari_playbacks.c index 40099cfb48..59995ec584 100644 --- a/res/res_ari_playbacks.c +++ b/res/res_ari_playbacks.c @@ -307,5 +307,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Pla .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_recordings.c b/res/res_ari_recordings.c index fe3d343ee2..75d999f226 100644 --- a/res/res_ari_recordings.c +++ b/res/res_ari_recordings.c @@ -891,5 +891,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Rec .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_ari_sounds.c b/res/res_ari_sounds.c index 8d5928a504..7b167796d4 100644 --- a/res/res_ari_sounds.c +++ b/res/res_ari_sounds.c @@ -237,5 +237,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Sou .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); diff --git a/res/res_chan_stats.c b/res/res_chan_stats.c index 061d0867eb..c396120dcd 100644 --- a/res/res_chan_stats.c +++ b/res/res_chan_stats.c @@ -182,5 +182,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Example of how to use St .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, - .nonoptreq = "res_statsd" ); diff --git a/res/res_endpoint_stats.c b/res/res_endpoint_stats.c index 1e3f104c21..a9ccee5586 100644 --- a/res/res_endpoint_stats.c +++ b/res/res_endpoint_stats.c @@ -151,5 +151,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Endpoint statistics", .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, - .nonoptreq = "res_statsd" ); diff --git a/res/res_stasis_answer.c b/res/res_stasis_answer.c index 407a631354..c34bc830cd 100644 --- a/res/res_stasis_answer.c +++ b/res/res_stasis_answer.c @@ -73,5 +73,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis applicatio .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis" ); diff --git a/res/res_stasis_device_state.c b/res/res_stasis_device_state.c index 6527af4a61..20c4b5c61e 100644 --- a/res/res_stasis_device_state.c +++ b/res/res_stasis_device_state.c @@ -482,5 +482,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis applicatio .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis" ); diff --git a/res/res_stasis_mailbox.c b/res/res_stasis_mailbox.c index 5ed061de2e..eaf2e60179 100644 --- a/res/res_stasis_mailbox.c +++ b/res/res_stasis_mailbox.c @@ -161,5 +161,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis applicatio .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis,res_mwi_external" ); diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c index ca0446b89e..de6f591790 100644 --- a/res/res_stasis_playback.c +++ b/res/res_stasis_playback.c @@ -759,5 +759,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis applicatio .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis,res_stasis_recording" ); diff --git a/res/res_stasis_recording.c b/res/res_stasis_recording.c index 56984cb401..369ae39300 100644 --- a/res/res_stasis_recording.c +++ b/res/res_stasis_recording.c @@ -655,6 +655,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis", - .load_pri = AST_MODPRI_APP_DEPEND + .load_pri = AST_MODPRI_APP_DEPEND, ); diff --git a/res/res_stasis_snoop.c b/res/res_stasis_snoop.c index f797a9b942..00b9735de3 100644 --- a/res/res_stasis_snoop.c +++ b/res/res_stasis_snoop.c @@ -445,5 +445,4 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis applicatio .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis" ); diff --git a/res/res_stasis_test.c b/res/res_stasis_test.c index 19d2a42c6a..86a98450e1 100644 --- a/res/res_stasis_test.c +++ b/res/res_stasis_test.c @@ -103,8 +103,7 @@ struct stasis_message_sink *stasis_message_sink_create(void) * it has to do with how we load modules. * * 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. + * at the end of the file. * * Asterisk loads the module, inspects the field, then loads any needed * dependencies. This works because Asterisk passes \c RTLD_LAZY to the initial diff --git a/rest-api-templates/res_ari_resource.c.mustache b/rest-api-templates/res_ari_resource.c.mustache index c2ffd8eed1..89f48c50f1 100644 --- a/rest-api-templates/res_ari_resource.c.mustache +++ b/rest-api-templates/res_ari_resource.c.mustache @@ -322,6 +322,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - {{{ .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari,res_stasis", ); {{/api_declaration}} diff --git a/tests/test_ari.c b/tests/test_ari.c index bce5f95d64..66c299e024 100644 --- a/tests/test_ari.c +++ b/tests/test_ari.c @@ -573,5 +573,4 @@ static int load_module(void) AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ARI testing", .load = load_module, .unload = unload_module, - .nonoptreq = "res_ari", ); diff --git a/tests/test_res_stasis.c b/tests/test_res_stasis.c index cb79fa6fea..7a417854d4 100644 --- a/tests/test_res_stasis.c +++ b/tests/test_res_stasis.c @@ -195,5 +195,4 @@ static int load_module(void) AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Stasis Core testing", .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis", ); diff --git a/tests/test_stasis_endpoints.c b/tests/test_stasis_endpoints.c index 134738fee5..88f0cb49c0 100644 --- a/tests/test_stasis_endpoints.c +++ b/tests/test_stasis_endpoints.c @@ -306,5 +306,4 @@ static int load_module(void) AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Endpoint stasis-related testing", .load = load_module, .unload = unload_module, - .nonoptreq = "res_stasis_test", ); -- GitLab