<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/5804">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabled<br><br>If sending unsolicited mwi to all endpoints on startup is disabled<br>(mwi_disable_initial_unsolicited=yes) do not need to create subscriptions.<br>If there are many (thousands) realtime endpoints configured with unsolicited mwi<br>and Vociemail Storage configured as ODBC or IMAP there will be huge number of<br>DB/IMAP requests on startup.<br><br>ASTERISK-26230 #close<br><br>Change-Id: I50ae909639e3ee298b931a54def4b2b9e0fb86c5<br>---<br>M res/res_pjsip_mwi.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c<br>index e625df7..3dfccef 100644<br>--- a/res/res_pjsip_mwi.c<br>+++ b/res/res_pjsip_mwi.c<br>@@ -1278,7 +1278,9 @@<br> <br> static int reload(void)<br> {<br>-  create_mwi_subscriptions();<br>+  if (!ast_sip_get_mwi_disable_initial_unsolicited()) {<br>+                create_mwi_subscriptions();<br>+  }<br>     return 0;<br> }<br> <br>@@ -1301,13 +1303,13 @@<br>             ast_sip_unregister_subscription_handler(&mwi_handler);<br>            return AST_MODULE_LOAD_DECLINE;<br>       }<br>-    create_mwi_subscriptions();<br> <br>        ast_sorcery_observer_add(ast_sip_get_sorcery(), "contact", &mwi_contact_observer);<br>      ast_sorcery_observer_add(ast_sip_get_sorcery(), "global", &global_observer);<br>    ast_sorcery_reload_object(ast_sip_get_sorcery(), "global");<br> <br>      if (!ast_sip_get_mwi_disable_initial_unsolicited()) {<br>+                create_mwi_subscriptions();<br>           if (ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {<br>                     ast_sip_push_task(NULL, send_initial_notify_all, NULL);<br>               } else {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5804">change 5804</a>. To unsubscribe, 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/5804"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I50ae909639e3ee298b931a54def4b2b9e0fb86c5 </div>
<div style="display:none"> Gerrit-Change-Number: 5804 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>