[Asterisk-code-review] loader: Add dependency fields to module structures. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Mon Jan 8 16:06:37 CST 2018
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7872
Change subject: loader: Add dependency fields to module structures.
......................................................................
loader: Add dependency fields to module structures.
* Declare 'requires' and 'enhances' text fields on module info structure.
* Rename 'nonoptreq' to 'optional_apis'.
* Update doxygen comments.
Still need to investigate dependencies among modules I cannot compile.
Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
---
M apps/app_adsiprog.c
M apps/app_getcpeid.c
M apps/app_queue.c
M apps/app_speech_utils.c
M apps/app_stack.c
M apps/app_stasis.c
M apps/app_voicemail.c
M channels/chan_dahdi.c
M channels/chan_iax2.c
M channels/chan_mgcp.c
M channels/chan_motif.c
M channels/chan_pjsip.c
M channels/chan_rtp.c
M channels/chan_sip.c
M funcs/func_aes.c
M funcs/func_pjsip_aor.c
M funcs/func_pjsip_contact.c
M funcs/func_pjsip_endpoint.c
M include/asterisk/module.h
M pbx/pbx_ael.c
M pbx/pbx_dundi.c
M res/res_agi.c
M res/res_ari.c
M res/res_ari_applications.c
M res/res_ari_asterisk.c
M res/res_ari_bridges.c
M res/res_ari_channels.c
M res/res_ari_device_states.c
M res/res_ari_endpoints.c
M res/res_ari_events.c
M res/res_ari_mailboxes.c
M res/res_ari_playbacks.c
M res/res_ari_recordings.c
M res/res_ari_sounds.c
M res/res_chan_stats.c
M res/res_endpoint_stats.c
M res/res_fax_spandsp.c
M res/res_hep_rtcp.c
M res/res_mwi_external_ami.c
M res/res_pjsip.c
M res/res_pjsip_acl.c
M res/res_pjsip_authenticator_digest.c
M res/res_pjsip_caller_id.c
M res/res_pjsip_dialog_info_body_generator.c
M res/res_pjsip_diversion.c
M res/res_pjsip_dlg_options.c
M res/res_pjsip_dtmf_info.c
M res/res_pjsip_empty_info.c
M res/res_pjsip_endpoint_identifier_anonymous.c
M res/res_pjsip_endpoint_identifier_ip.c
M res/res_pjsip_endpoint_identifier_user.c
M res/res_pjsip_exten_state.c
M res/res_pjsip_header_funcs.c
M res/res_pjsip_history.c
M res/res_pjsip_logger.c
M res/res_pjsip_messaging.c
M res/res_pjsip_mwi.c
M res/res_pjsip_mwi_body_generator.c
M res/res_pjsip_nat.c
M res/res_pjsip_notify.c
M res/res_pjsip_one_touch_record_info.c
M res/res_pjsip_outbound_authenticator_digest.c
M res/res_pjsip_outbound_publish.c
M res/res_pjsip_outbound_registration.c
M res/res_pjsip_path.c
M res/res_pjsip_phoneprov_provider.c
M res/res_pjsip_pidf_body_generator.c
M res/res_pjsip_pidf_digium_body_supplement.c
M res/res_pjsip_pidf_eyebeam_body_supplement.c
M res/res_pjsip_publish_asterisk.c
M res/res_pjsip_pubsub.c
M res/res_pjsip_refer.c
M res/res_pjsip_registrar.c
M res/res_pjsip_registrar_expire.c
M res/res_pjsip_rfc3326.c
M res/res_pjsip_sdp_rtp.c
M res/res_pjsip_send_to_voicemail.c
M res/res_pjsip_session.c
M res/res_pjsip_sips_contact.c
M res/res_pjsip_t38.c
M res/res_pjsip_transport_management.c
M res/res_pjsip_transport_websocket.c
M res/res_pjsip_xpidf_body_generator.c
M res/res_stasis_answer.c
M res/res_stasis_device_state.c
M res/res_stasis_mailbox.c
M res/res_stasis_playback.c
M res/res_stasis_recording.c
M res/res_stasis_snoop.c
M rest-api-templates/res_ari_resource.c.mustache
M tests/test_ari.c
M tests/test_ari_model.c
M tests/test_res_pjsip_scheduler.c
M tests/test_res_stasis.c
M tests/test_stasis_endpoints.c
95 files changed, 165 insertions(+), 64 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/7872/1
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index 2dd226f..688168e 100644
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -1613,5 +1613,5 @@
.support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_adsi",
+ .requires = "res_adsi",
);
diff --git a/apps/app_getcpeid.c b/apps/app_getcpeid.c
index e0b9f12..868dc97 100644
--- a/apps/app_getcpeid.c
+++ b/apps/app_getcpeid.c
@@ -140,5 +140,5 @@
.support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_adsi",
+ .requires = "res_adsi",
);
diff --git a/apps/app_queue.c b/apps/app_queue.c
index c62828c..6d7b846 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -11345,5 +11345,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_DEVSTATE_CONSUMER,
- .nonoptreq = "res_monitor",
+ .optional_apis = "res_monitor",
);
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index 339c316..2ba297e 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -1003,5 +1003,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_speech",
+ .requires = "res_speech",
);
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 459c06d..60d2cf3 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -1320,5 +1320,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
- .nonoptreq = "res_agi",
+ .optional_apis = "res_agi",
);
diff --git a/apps/app_stasis.c b/apps/app_stasis.c
index 81c58e8..8d09349 100644
--- a/apps/app_stasis.c
+++ b/apps/app_stasis.c
@@ -144,5 +144,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis",
+ .requires = "res_stasis",
);
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 0bcfa4f..4fb1cba 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -16488,5 +16488,5 @@
.load = load_module,
.unload = unload_module,
.reload = reload,
- .nonoptreq = "res_adsi,res_smdi",
+ .optional_apis = "res_adsi,res_smdi",
);
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 4859d1a..1bbcce2 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -19542,5 +19542,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
- .nonoptreq = "res_smdi",
+ .optional_apis = "res_smdi",
);
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 469fcda..0a88e02 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -14902,5 +14902,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
- .nonoptreq = "res_crypto",
+ .optional_apis = "res_crypto",
);
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 547226c..5d4b4cd 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -5025,5 +5025,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
- .nonoptreq = "res_pktccops",
+ .optional_apis = "res_pktccops",
);
diff --git a/channels/chan_motif.c b/channels/chan_motif.c
index df1eeb8..05184ca 100644
--- a/channels/chan_motif.c
+++ b/channels/chan_motif.c
@@ -2821,4 +2821,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
+ .requires = "res_xmpp",
);
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 4c30d33..68da4a1 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -3110,4 +3110,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
+ .requires = "res_pjsip,res_pjsip_session",
);
diff --git a/channels/chan_rtp.c b/channels/chan_rtp.c
index 0a59e33..7d9e26d 100644
--- a/channels/chan_rtp.c
+++ b/channels/chan_rtp.c
@@ -432,4 +432,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
+ .requires = "res_rtp_multicast",
);
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e204f00..ff99236 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -35737,5 +35737,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
- .nonoptreq = "res_crypto,res_http_websocket",
+ .optional_apis = "res_crypto,res_http_websocket",
);
diff --git a/funcs/func_aes.c b/funcs/func_aes.c
index 7208cd4..af3f257 100644
--- a/funcs/func_aes.c
+++ b/funcs/func_aes.c
@@ -180,5 +180,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_crypto",
+ .requires = "res_crypto",
);
diff --git a/funcs/func_pjsip_aor.c b/funcs/func_pjsip_aor.c
index 799e9e4..589f667 100644
--- a/funcs/func_pjsip_aor.c
+++ b/funcs/func_pjsip_aor.c
@@ -181,4 +181,9 @@
return ast_custom_function_register(&pjsip_aor_function);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get information about a PJSIP AOR");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Get information about a PJSIP AOR",
+ .support_level = AST_MODULE_SUPPORT_CORE,
+ .load = load_module,
+ .unload = unload_module,
+ .requires = "res_pjsip",
+);
diff --git a/funcs/func_pjsip_contact.c b/funcs/func_pjsip_contact.c
index c840365..fac4cb6 100644
--- a/funcs/func_pjsip_contact.c
+++ b/funcs/func_pjsip_contact.c
@@ -198,4 +198,9 @@
return ast_custom_function_register(&pjsip_contact_function);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get information about a PJSIP contact");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Get information about a PJSIP contact",
+ .support_level = AST_MODULE_SUPPORT_CORE,
+ .load = load_module,
+ .unload = unload_module,
+ .requires = "res_pjsip",
+);
diff --git a/funcs/func_pjsip_endpoint.c b/funcs/func_pjsip_endpoint.c
index a64d93b..e4a6aba 100644
--- a/funcs/func_pjsip_endpoint.c
+++ b/funcs/func_pjsip_endpoint.c
@@ -156,4 +156,9 @@
return ast_custom_function_register(&pjsip_endpoint_function);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get information about a PJSIP endpoint");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Get information about a PJSIP endpoint",
+ .support_level = AST_MODULE_SUPPORT_CORE,
+ .load = load_module,
+ .unload = unload_module,
+ .requires = "res_pjsip",
+);
diff --git a/include/asterisk/module.h b/include/asterisk/module.h
index 103cd30..62f93ec 100644
--- a/include/asterisk/module.h
+++ b/include/asterisk/module.h
@@ -304,26 +304,28 @@
};
struct ast_module_info {
-
/*!
* The 'self' pointer for a module; it will be set by the loader before
* it calls the module's load_module() entrypoint, and used by various
* other macros that need to identify the module.
*/
-
struct ast_module *self;
- enum ast_module_load_result (*load)(void); /*!< register stuff etc. Optional. */
- int (*reload)(void); /*!< config etc. Optional. */
- int (*unload)(void); /*!< unload. called with the module locked */
- const char *name; /*!< name of the module for loader reference and CLI commands */
- const char *description; /*!< user friendly description of the module. */
+ /*! Register stuff etc. Optional. */
+ enum ast_module_load_result (*load)(void);
+ /*! Config etc. Optional. */
+ int (*reload)(void);
+ /*! Unload. called with the module locked */
+ int (*unload)(void);
+ /*! Name of the module for loader reference and CLI commands */
+ const char *name;
+ /*! User friendly description of the module. */
+ const char *description;
/*!
* This holds the ASTERISK_GPL_KEY, signifiying that you agree to the terms of
* the Asterisk license as stated in the ASTERISK_GPL_KEY. Your module will not
* load if it does not return the EXACT key string.
*/
-
const char *key;
unsigned int flags;
@@ -337,10 +339,38 @@
* 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. */
- const char *nonoptreq;
+ /*! Modules which must be started first, in comma-separated string format. */
+ const char *requires;
+
+ /*!
+ * Modules which should be started first, in comma-separated string format.
+ * These are only required if OPTIONAL_API is disabled.
+ */
+ const char *optional_apis;
+
+ /*!
+ * \brief Modules that we provide enhanced functionality for.
+ *
+ * This is similar to a "requires" but specifies that we add functionality to
+ * the other modules. Any module that requires something we "enhances" will
+ * also require us, but only if we are dlopen'ed.
+ *
+ * Example:
+ * - res_fax_spandsp has .enhances = "res_fax".
+ * - res_my_module has .requires = "res_fax" but has no direct knowledge
+ * of res_fax_spandsp.
+ *
+ * This forces the following startup order among the 3 modules:
+ * 1) res_fax starts.
+ * 2) res_fax_spandsp starts, holds a reference to res_fax.
+ * 3) res_mymod starts, holds a reference to res_fax and res_fax_spandsp.
+ *
+ * If res_fax_spandsp were not being loaded res_mymod would load with
+ * res_fax only. If res_fax_spandsp were later loaded res_mymod would
+ * get a reference to it.
+ */
+ const char *enhances;
+
/*! The support level for the given module */
enum ast_module_support_level support_level;
};
@@ -411,6 +441,8 @@
AST_BUILDOPT_SUM, \
load_pri, \
NULL, \
+ NULL, \
+ NULL, \
support_level, \
}; \
static void __attribute__((constructor)) __reg_module(void) \
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 6517b3a..d55f2d4 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -292,6 +292,7 @@
.load = load_module,
.unload = unload_module,
.reload = reload,
+ .requires = "res_ael_share",
);
#ifdef AAL_ARGCHECK
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index e0aeb49..8c4b513 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -5063,5 +5063,5 @@
.load = load_module,
.unload = unload_module,
.reload = reload,
- .nonoptreq = "res_crypto",
+ .optional_apis = "res_crypto",
);
diff --git a/res/res_agi.c b/res/res_agi.c
index 393a503..2d0dc27 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -4717,4 +4717,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_speech",
);
diff --git a/res/res_ari.c b/res/res_ari.c
index 9104ede..bfd98f5 100644
--- a/res/res_ari.c
+++ b/res/res_ari.c
@@ -1197,6 +1197,7 @@
.load = load_module,
.unload = unload_module,
.reload = reload_module,
- .nonoptreq = "res_http_websocket",
+ .optional_apis = "res_http_websocket",
+ .requires = "res_stasis",
.load_pri = AST_MODPRI_APP_DEPEND,
);
diff --git a/res/res_ari_applications.c b/res/res_ari_applications.c
index cf700c4..323bdb3 100644
--- a/res/res_ari_applications.c
+++ b/res/res_ari_applications.c
@@ -518,5 +518,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_asterisk.c b/res/res_ari_asterisk.c
index eb0617b..9f76f93 100644
--- a/res/res_ari_asterisk.c
+++ b/res/res_ari_asterisk.c
@@ -1239,5 +1239,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_bridges.c b/res/res_ari_bridges.c
index 35fd3bd..34b9d89 100644
--- a/res/res_ari_bridges.c
+++ b/res/res_ari_bridges.c
@@ -1579,5 +1579,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_channels.c b/res/res_ari_channels.c
index f6befcc..7862c10 100644
--- a/res/res_ari_channels.c
+++ b/res/res_ari_channels.c
@@ -2869,5 +2869,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c
index f393935..ec8890b 100644
--- a/res/res_ari_device_states.c
+++ b/res/res_ari_device_states.c
@@ -349,5 +349,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c
index d1242c0..07197ca 100644
--- a/res/res_ari_endpoints.c
+++ b/res/res_ari_endpoints.c
@@ -473,5 +473,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_events.c b/res/res_ari_events.c
index f916d0e..f750a54 100644
--- a/res/res_ari_events.c
+++ b/res/res_ari_events.c
@@ -473,5 +473,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_mailboxes.c b/res/res_ari_mailboxes.c
index 1f6d2cc..6469f93 100644
--- a/res/res_ari_mailboxes.c
+++ b/res/res_ari_mailboxes.c
@@ -355,5 +355,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_playbacks.c b/res/res_ari_playbacks.c
index 40099cf..0148a74 100644
--- a/res/res_ari_playbacks.c
+++ b/res/res_ari_playbacks.c
@@ -307,5 +307,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_recordings.c b/res/res_ari_recordings.c
index fe3d343..531ff65 100644
--- a/res/res_ari_recordings.c
+++ b/res/res_ari_recordings.c
@@ -891,5 +891,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_ari_sounds.c b/res/res_ari_sounds.c
index 8d5928a..5c27ebd 100644
--- a/res/res_ari_sounds.c
+++ b/res/res_ari_sounds.c
@@ -237,5 +237,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
diff --git a/res/res_chan_stats.c b/res/res_chan_stats.c
index 061d086..dbc79f0 100644
--- a/res/res_chan_stats.c
+++ b/res/res_chan_stats.c
@@ -182,5 +182,5 @@
.support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_statsd"
+ .requires = "res_statsd"
);
diff --git a/res/res_endpoint_stats.c b/res/res_endpoint_stats.c
index 1e3f104..7ce44f9 100644
--- a/res/res_endpoint_stats.c
+++ b/res/res_endpoint_stats.c
@@ -151,5 +151,5 @@
.support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_statsd"
+ .requires = "res_statsd"
);
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c
index a3a82e4..045dbc7 100644
--- a/res/res_fax_spandsp.c
+++ b/res/res_fax_spandsp.c
@@ -1266,4 +1266,5 @@
.support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.unload = unload_module,
+ .enhances = "res_fax",
);
diff --git a/res/res_hep_rtcp.c b/res/res_hep_rtcp.c
index afad0c8..5163ff0 100644
--- a/res/res_hep_rtcp.c
+++ b/res/res_hep_rtcp.c
@@ -184,4 +184,5 @@
.support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.unload = unload_module,
+ .requires = "res_pjsip",
);
diff --git a/res/res_mwi_external_ami.c b/res/res_mwi_external_ami.c
index 8419f2f..8639fad 100644
--- a/res/res_mwi_external_ami.c
+++ b/res/res_mwi_external_ami.c
@@ -370,4 +370,6 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
+ .load_pri = AST_MODPRI_CHANNEL_DEPEND - 5,
+ .requires = "res_mwi_external",
);
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index c3deb98..01477ea 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -5046,4 +5046,5 @@
.unload = unload_module,
.reload = reload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND - 5,
+ .requires = "res_pjproject,res_pjsip_config_wizard",
);
diff --git a/res/res_pjsip_acl.c b/res/res_pjsip_acl.c
index 5c10e57..9269864 100644
--- a/res/res_pjsip_acl.c
+++ b/res/res_pjsip_acl.c
@@ -321,4 +321,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_authenticator_digest.c b/res/res_pjsip_authenticator_digest.c
index ef57e37..b6f2b74 100644
--- a/res/res_pjsip_authenticator_digest.c
+++ b/res/res_pjsip_authenticator_digest.c
@@ -554,4 +554,5 @@
.unload = unload_module,
.reload = reload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND - 5,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_caller_id.c b/res/res_pjsip_caller_id.c
index 64191a7..1673147 100644
--- a/res/res_pjsip_caller_id.c
+++ b/res/res_pjsip_caller_id.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -764,4 +763,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_dialog_info_body_generator.c b/res/res_pjsip_dialog_info_body_generator.c
index 7c386e3..866ea9d 100644
--- a/res/res_pjsip_dialog_info_body_generator.c
+++ b/res/res_pjsip_dialog_info_body_generator.c
@@ -20,7 +20,6 @@
<depend>pjproject</depend>
<depend>res_pjsip</depend>
<depend>res_pjsip_pubsub</depend>
- <depend>res_pjsip_exten_state</depend>
<support_level>core</support_level>
***/
@@ -219,4 +218,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_diversion.c b/res/res_pjsip_diversion.c
index efb5489..84c42dc 100644
--- a/res/res_pjsip_diversion.c
+++ b/res/res_pjsip_diversion.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -429,4 +428,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_dlg_options.c b/res/res_pjsip_dlg_options.c
index de1ac97..565ad2a 100644
--- a/res/res_pjsip_dlg_options.c
+++ b/res/res_pjsip_dlg_options.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -103,4 +102,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_dtmf_info.c b/res/res_pjsip_dtmf_info.c
index e534f3e..68df617 100644
--- a/res/res_pjsip_dtmf_info.c
+++ b/res/res_pjsip_dtmf_info.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -178,4 +177,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_empty_info.c b/res/res_pjsip_empty_info.c
index 774f9de..c67835c 100644
--- a/res/res_pjsip_empty_info.c
+++ b/res/res_pjsip_empty_info.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -84,4 +83,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_endpoint_identifier_anonymous.c b/res/res_pjsip_endpoint_identifier_anonymous.c
index b47aefa..16662eb 100644
--- a/res/res_pjsip_endpoint_identifier_anonymous.c
+++ b/res/res_pjsip_endpoint_identifier_anonymous.c
@@ -132,4 +132,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index 8b92cef..2b59663 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -728,4 +728,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND - 4,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_endpoint_identifier_user.c b/res/res_pjsip_endpoint_identifier_user.c
index ff97a62..1b0c7d9 100644
--- a/res/res_pjsip_endpoint_identifier_user.c
+++ b/res/res_pjsip_endpoint_identifier_user.c
@@ -214,4 +214,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND - 4,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_exten_state.c b/res/res_pjsip_exten_state.c
index 3e75613..e70eba7 100644
--- a/res/res_pjsip_exten_state.c
+++ b/res/res_pjsip_exten_state.c
@@ -1015,4 +1015,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND + 5,
+ .requires = "res_pjsip,res_pjsip_pubsub,res_pjsip_outbound_publish",
);
diff --git a/res/res_pjsip_header_funcs.c b/res/res_pjsip_header_funcs.c
index 648f1c8..06fba06 100644
--- a/res/res_pjsip_header_funcs.c
+++ b/res/res_pjsip_header_funcs.c
@@ -629,4 +629,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip,res_pjsip_session",
);
diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c
index d6b3eeb..40d26d5 100644
--- a/res/res_pjsip_history.c
+++ b/res/res_pjsip_history.c
@@ -1403,4 +1403,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_logger.c b/res/res_pjsip_logger.c
index d29a6e2..460b6a3 100644
--- a/res/res_pjsip_logger.c
+++ b/res/res_pjsip_logger.c
@@ -262,4 +262,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_messaging.c b/res/res_pjsip_messaging.c
index b6e7a64..3739bcf 100644
--- a/res/res_pjsip_messaging.c
+++ b/res/res_pjsip_messaging.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -850,4 +849,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 5423038..92dc7dc 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -1397,4 +1397,5 @@
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_CHANNEL_DEPEND + 5,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_mwi_body_generator.c b/res/res_pjsip_mwi_body_generator.c
index e827910..65ac600 100644
--- a/res/res_pjsip_mwi_body_generator.c
+++ b/res/res_pjsip_mwi_body_generator.c
@@ -116,4 +116,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_nat.c b/res/res_pjsip_nat.c
index e1d56e6..4231a1e 100644
--- a/res/res_pjsip_nat.c
+++ b/res/res_pjsip_nat.c
@@ -378,4 +378,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_notify.c b/res/res_pjsip_notify.c
index 59b7c6e..9767c56 100644
--- a/res/res_pjsip_notify.c
+++ b/res/res_pjsip_notify.c
@@ -1032,4 +1032,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_one_touch_record_info.c b/res/res_pjsip_one_touch_record_info.c
index ec5f9be..ef59fca 100644
--- a/res/res_pjsip_one_touch_record_info.c
+++ b/res/res_pjsip_one_touch_record_info.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -129,4 +128,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_outbound_authenticator_digest.c b/res/res_pjsip_outbound_authenticator_digest.c
index 7e2d711..54bba08 100644
--- a/res/res_pjsip_outbound_authenticator_digest.c
+++ b/res/res_pjsip_outbound_authenticator_digest.c
@@ -224,4 +224,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index e5f1295..b4e3320 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -1702,4 +1702,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjproject,res_pjsip",
);
diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index d9afcd2..79bea48 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -2289,4 +2289,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_path.c b/res/res_pjsip_path.c
index e170a75..b245f15 100644
--- a/res/res_pjsip_path.c
+++ b/res/res_pjsip_path.c
@@ -264,4 +264,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_phoneprov_provider.c b/res/res_pjsip_phoneprov_provider.c
index 7e082c4..11031c3 100644
--- a/res/res_pjsip_phoneprov_provider.c
+++ b/res/res_pjsip_phoneprov_provider.c
@@ -418,4 +418,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip,res_phoneprov",
);
diff --git a/res/res_pjsip_pidf_body_generator.c b/res/res_pjsip_pidf_body_generator.c
index 29c9e6b..6426dfa 100644
--- a/res/res_pjsip_pidf_body_generator.c
+++ b/res/res_pjsip_pidf_body_generator.c
@@ -135,4 +135,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_pidf_digium_body_supplement.c b/res/res_pjsip_pidf_digium_body_supplement.c
index 93e4982..f855e21 100644
--- a/res/res_pjsip_pidf_digium_body_supplement.c
+++ b/res/res_pjsip_pidf_digium_body_supplement.c
@@ -114,4 +114,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_pidf_eyebeam_body_supplement.c b/res/res_pjsip_pidf_eyebeam_body_supplement.c
index 4047084..6629aa3 100644
--- a/res/res_pjsip_pidf_eyebeam_body_supplement.c
+++ b/res/res_pjsip_pidf_eyebeam_body_supplement.c
@@ -111,4 +111,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_publish_asterisk.c b/res/res_pjsip_publish_asterisk.c
index 53ee60f..13d7fd4 100644
--- a/res/res_pjsip_publish_asterisk.c
+++ b/res/res_pjsip_publish_asterisk.c
@@ -934,4 +934,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND + 5,
+ .requires = "res_pjsip,res_pjsip_outbound_publish,res_pjsip_pubsub",
);
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index 1f24de0..af696b8 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -5518,4 +5518,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index 62f8b67..f823385 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -1229,4 +1229,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip,res_pjsip_session",
);
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c
index f0da6de..7277a5f 100644
--- a/res/res_pjsip_registrar.c
+++ b/res/res_pjsip_registrar.c
@@ -1134,4 +1134,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND - 3,
+ .requires = "res_pjproject,res_pjsip",
);
diff --git a/res/res_pjsip_registrar_expire.c b/res/res_pjsip_registrar_expire.c
index fe4a60d..85e3fb8 100644
--- a/res/res_pjsip_registrar_expire.c
+++ b/res/res_pjsip_registrar_expire.c
@@ -150,4 +150,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_rfc3326.c b/res/res_pjsip_rfc3326.c
index d49a170..8b8035e 100644
--- a/res/res_pjsip_rfc3326.c
+++ b/res/res_pjsip_rfc3326.c
@@ -19,7 +19,6 @@
/*** MODULEINFO
<depend>pjproject</depend>
<depend>res_pjsip</depend>
- <depend>res_pjsip_session</depend>
<support_level>core</support_level>
***/
@@ -156,4 +155,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 9e04119..3cc9764 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -1970,4 +1970,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
+ .requires = "res_pjsip,res_pjsip_session",
);
diff --git a/res/res_pjsip_send_to_voicemail.c b/res/res_pjsip_send_to_voicemail.c
index 1cd28ce..06c3edc 100644
--- a/res/res_pjsip_send_to_voicemail.c
+++ b/res/res_pjsip_send_to_voicemail.c
@@ -236,4 +236,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip,res_pjsip_session",
);
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index c339382..fbd2035 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -4196,4 +4196,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_sips_contact.c b/res/res_pjsip_sips_contact.c
index 7579be6..41b26df 100644
--- a/res/res_pjsip_sips_contact.c
+++ b/res/res_pjsip_sips_contact.c
@@ -104,4 +104,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 8f1905f..7b7cd99 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -1053,4 +1053,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
+ .requires = "res_pjsip,res_pjsip_session",
);
diff --git a/res/res_pjsip_transport_management.c b/res/res_pjsip_transport_management.c
index eb92eb7..acffb86 100644
--- a/res/res_pjsip_transport_management.c
+++ b/res/res_pjsip_transport_management.c
@@ -397,4 +397,5 @@
.reload = reload_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND - 4,
+ .requires = "res_pjsip",
);
diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c
index 3ce9039..af1345f 100644
--- a/res/res_pjsip_transport_websocket.c
+++ b/res/res_pjsip_transport_websocket.c
@@ -518,4 +518,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
+ .requires = "res_pjsip,res_http_websocket",
);
diff --git a/res/res_pjsip_xpidf_body_generator.c b/res/res_pjsip_xpidf_body_generator.c
index 41f6224..f7c84db 100644
--- a/res/res_pjsip_xpidf_body_generator.c
+++ b/res/res_pjsip_xpidf_body_generator.c
@@ -20,7 +20,6 @@
<depend>pjproject</depend>
<depend>res_pjsip</depend>
<depend>res_pjsip_pubsub</depend>
- <depend>res_pjsip_exten_state</depend>
<support_level>core</support_level>
***/
@@ -177,4 +176,5 @@
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
+ .requires = "res_pjsip,res_pjsip_pubsub",
);
diff --git a/res/res_stasis_answer.c b/res/res_stasis_answer.c
index 407a631..6ec50c8 100644
--- a/res/res_stasis_answer.c
+++ b/res/res_stasis_answer.c
@@ -73,5 +73,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis"
+ .requires = "res_stasis",
);
diff --git a/res/res_stasis_device_state.c b/res/res_stasis_device_state.c
index 6527af4..be09b15 100644
--- a/res/res_stasis_device_state.c
+++ b/res/res_stasis_device_state.c
@@ -482,5 +482,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis"
+ .requires = "res_stasis",
);
diff --git a/res/res_stasis_mailbox.c b/res/res_stasis_mailbox.c
index 5ed061d..3d0e9db 100644
--- a/res/res_stasis_mailbox.c
+++ b/res/res_stasis_mailbox.c
@@ -161,5 +161,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis,res_mwi_external"
+ .requires = "res_stasis,res_mwi_external"
);
diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c
index ca0446b..5b8256f 100644
--- a/res/res_stasis_playback.c
+++ b/res/res_stasis_playback.c
@@ -759,5 +759,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis,res_stasis_recording"
+ .requires = "res_stasis,res_stasis_recording"
);
diff --git a/res/res_stasis_recording.c b/res/res_stasis_recording.c
index 56984cb..17213aa 100644
--- a/res/res_stasis_recording.c
+++ b/res/res_stasis_recording.c
@@ -655,6 +655,6 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis",
+ .requires = "res_stasis",
.load_pri = AST_MODPRI_APP_DEPEND
);
diff --git a/res/res_stasis_snoop.c b/res/res_stasis_snoop.c
index f797a9b..b234de1 100644
--- a/res/res_stasis_snoop.c
+++ b/res/res_stasis_snoop.c
@@ -445,5 +445,5 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis"
+ .requires = "res_stasis",
);
diff --git a/rest-api-templates/res_ari_resource.c.mustache b/rest-api-templates/res_ari_resource.c.mustache
index d4ccda9..c1f680f 100644
--- a/rest-api-templates/res_ari_resource.c.mustache
+++ b/rest-api-templates/res_ari_resource.c.mustache
@@ -324,6 +324,6 @@
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari,res_stasis",
+ .requires = "res_ari,res_ari_model,res_stasis",
);
{{/api_declaration}}
diff --git a/tests/test_ari.c b/tests/test_ari.c
index bce5f95..a5db228 100644
--- a/tests/test_ari.c
+++ b/tests/test_ari.c
@@ -573,5 +573,5 @@
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ARI testing",
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_ari",
+ .requires = "res_ari",
);
diff --git a/tests/test_ari_model.c b/tests/test_ari_model.c
index caf4118..e5a96cd 100644
--- a/tests/test_ari_model.c
+++ b/tests/test_ari_model.c
@@ -452,4 +452,9 @@
return AST_MODULE_LOAD_SUCCESS;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Test");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Skeleton (sample) Test",
+ .support_level = AST_MODULE_SUPPORT_CORE,
+ .load = load_module,
+ .unload = unload_module,
+ .requires = "res_ari_model",
+);
diff --git a/tests/test_res_pjsip_scheduler.c b/tests/test_res_pjsip_scheduler.c
index da51d43..47a7034 100644
--- a/tests/test_res_pjsip_scheduler.c
+++ b/tests/test_res_pjsip_scheduler.c
@@ -396,4 +396,9 @@
return 0;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "res_pjsip scheduler test module");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "res_pjsip scheduler test module",
+ .support_level = AST_MODULE_SUPPORT_CORE,
+ .load = load_module,
+ .unload = unload_module,
+ .requires = "res_pjsip",
+);
diff --git a/tests/test_res_stasis.c b/tests/test_res_stasis.c
index cb79fa6..077cc4c 100644
--- a/tests/test_res_stasis.c
+++ b/tests/test_res_stasis.c
@@ -195,5 +195,5 @@
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Stasis Core testing",
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis",
+ .requires = "res_stasis",
);
diff --git a/tests/test_stasis_endpoints.c b/tests/test_stasis_endpoints.c
index 134738f..42c7532 100644
--- a/tests/test_stasis_endpoints.c
+++ b/tests/test_stasis_endpoints.c
@@ -306,5 +306,5 @@
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Endpoint stasis-related testing",
.load = load_module,
.unload = unload_module,
- .nonoptreq = "res_stasis_test",
+ .requires = "res_stasis_test",
);
--
To view, visit https://gerrit.asterisk.org/7872
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
Gerrit-Change-Number: 7872
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180108/ee822741/attachment-0001.html>
More information about the asterisk-code-review
mailing list