[asterisk-commits] res pjsip mwi: don't create mwi subscriptions if initial uns... (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 14 09:40:37 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5805 )
Change subject: res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabled
......................................................................
res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabled
If sending unsolicited mwi to all endpoints on startup is disabled
(mwi_disable_initial_unsolicited=yes) do not need to create subscriptions.
If there are many (thousands) realtime endpoints configured with unsolicited mwi
and Vociemail Storage configured as ODBC or IMAP there will be huge number of
DB/IMAP requests on startup.
ASTERISK-26230 #close
Change-Id: I50ae909639e3ee298b931a54def4b2b9e0fb86c5
---
M res/res_pjsip_mwi.c
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index e625df7..3dfccef 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -1278,7 +1278,9 @@
static int reload(void)
{
- create_mwi_subscriptions();
+ if (!ast_sip_get_mwi_disable_initial_unsolicited()) {
+ create_mwi_subscriptions();
+ }
return 0;
}
@@ -1301,13 +1303,13 @@
ast_sip_unregister_subscription_handler(&mwi_handler);
return AST_MODULE_LOAD_DECLINE;
}
- create_mwi_subscriptions();
ast_sorcery_observer_add(ast_sip_get_sorcery(), "contact", &mwi_contact_observer);
ast_sorcery_observer_add(ast_sip_get_sorcery(), "global", &global_observer);
ast_sorcery_reload_object(ast_sip_get_sorcery(), "global");
if (!ast_sip_get_mwi_disable_initial_unsolicited()) {
+ create_mwi_subscriptions();
if (ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {
ast_sip_push_task(NULL, send_initial_notify_all, NULL);
} else {
--
To view, visit https://gerrit.asterisk.org/5805
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I50ae909639e3ee298b931a54def4b2b9e0fb86c5
Gerrit-Change-Number: 5805
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170614/d59ae2e4/attachment-0001.html>
More information about the asterisk-commits
mailing list