res_rtp_asterisk.c: Add conditional module dependency to res_pjproject
authorRichard Mudgett <rmudgett@digium.com>
Wed, 17 Oct 2018 21:08:19 +0000 (16:08 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 17 Oct 2018 21:13:51 +0000 (16:13 -0500)
* The dependency ensures that res_pjproject cannot be manually unloaded
before res_rtp_asterisk.
* The dependency allows startup loading errors to report that
res_rtp_asterisk depends upon res_pjproject.

Change-Id: Icf5e7581f4ddd6189929f6174c74dd951f887377

res/res_rtp_asterisk.c

index 4b2a138..465f9bc 100644 (file)
@@ -8330,4 +8330,7 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Asterisk RTP Stack",
        .unload = unload_module,
        .reload = reload_module,
        .load_pri = AST_MODPRI_CHANNEL_DEPEND,
        .unload = unload_module,
        .reload = reload_module,
        .load_pri = AST_MODPRI_CHANNEL_DEPEND,
+#ifdef HAVE_PJPROJECT
+       .requires = "res_pjproject",
+#endif
 );
 );