<p>Boris P. Korzun has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18677">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_prometheus: Optional load res_pjsip_outbound_registration.so<br><br>Switched res_pjsip_outbound_registration.so dep to optional. Added<br>module loaded check before using it.<br><br>ASTERISK-30101 #close<br><br>Change-Id: Ia34f1684d984e821fbdd4de8911f930337703666<br>---<br>M res/res_prometheus.c<br>1 file changed, 7 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/18677/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_prometheus.c b/res/res_prometheus.c</span><br><span>index 4aacf6e..d7b0507 100644</span><br><span>--- a/res/res_prometheus.c</span><br><span>+++ b/res/res_prometheus.c</span><br><span>@@ -974,8 +974,11 @@</span><br><span>         if (cli_init()</span><br><span>               || channel_metrics_init()</span><br><span>            || endpoint_metrics_init()</span><br><span style="color: hsl(0, 100%, 40%);">-              || bridge_metrics_init()</span><br><span style="color: hsl(0, 100%, 40%);">-                || pjsip_outbound_registration_metrics_init()) {</span><br><span style="color: hsl(120, 100%, 40%);">+              || bridge_metrics_init()) {</span><br><span style="color: hsl(120, 100%, 40%);">+           goto cleanup;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+     if(ast_module_check("res_pjsip_outbound_registration.so")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                if (pjsip_outbound_registration_metrics_init())</span><br><span>              goto cleanup;</span><br><span>        }</span><br><span> </span><br><span>@@ -1004,6 +1007,7 @@</span><br><span>        .load_pri = AST_MODPRI_DEFAULT,</span><br><span> #ifdef HAVE_PJPROJECT</span><br><span>     /* This module explicitly calls into res_pjsip if Asterisk is built with PJSIP support, so they are required. */</span><br><span style="color: hsl(0, 100%, 40%);">-        .requires = "res_pjsip,res_pjsip_outbound_registration",</span><br><span style="color: hsl(120, 100%, 40%);">+    .requires = "res_pjsip",</span><br><span style="color: hsl(120, 100%, 40%);">+    .optional_modules = "res_pjsip_outbound_registration",</span><br><span> #endif</span><br><span> );</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18677">change 18677</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/18677"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia34f1684d984e821fbdd4de8911f930337703666 </div>
<div style="display:none"> Gerrit-Change-Number: 18677 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Boris P. Korzun <drtr0jan@yandex.ru> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>