[Asterisk-code-review] pjsip distributor.c: Ignore messages until fully booted. (asterisk[certified/13.1])
Richard Mudgett
asteriskteam at digium.com
Wed Jun 8 17:17:51 CDT 2016
Richard Mudgett has uploaded a new change for review.
https://gerrit.asterisk.org/2978
Change subject: pjsip_distributor.c: Ignore messages until fully booted.
......................................................................
pjsip_distributor.c: Ignore messages until fully booted.
We should not be processing any incoming messages until we are fully
booted. We may not have dialplan or other needed configuration loaded
yet.
ASTERISK-26089 #close
Reported by: Scott Griepentrog
ASTERISK-26088
Reported by: Richard Mudgett
Change-Id: I584aefb4f34b885a8927e1f13a2c64babd606264
---
M CHANGES
M res/res_pjsip/pjsip_distributor.c
2 files changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/78/2978/1
diff --git a/CHANGES b/CHANGES
index 7314549..8258b25 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,15 @@
==============================================================================
------------------------------------------------------------------------------
+--- Functionality changes from Asterisk 13.1.0-cert4 to Asterisk 13.1-cert8 --
+------------------------------------------------------------------------------
+
+res_pjsip
+------------------
+ * When starting Asterisk, received traffic will now be ignored until Asterisk
+ has loaded all modules and is fully booted.
+
+------------------------------------------------------------------------------
--- Functionality changes from Asterisk 13.1.0-cert3 to Asterisk 13.1-cert4 --
------------------------------------------------------------------------------
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index 79c1916..75cb609 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -253,11 +253,20 @@
static pj_bool_t distributor(pjsip_rx_data *rdata)
{
- pjsip_dialog *dlg = find_dialog(rdata);
+ pjsip_dialog *dlg;
struct distributor_dialog_data *dist = NULL;
struct ast_taskprocessor *serializer = NULL;
pjsip_rx_data *clone;
+ if (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) {
+ /*
+ * Ignore everything until we are fully booted. Let the
+ * peer retransmit messages until we are ready.
+ */
+ return PJ_TRUE;
+ }
+
+ dlg = find_dialog(rdata);
if (dlg) {
ast_debug(3, "Searching for serializer on dialog %s for %s\n",
dlg->obj_name, rdata->msg_info.info);
--
To view, visit https://gerrit.asterisk.org/2978
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I584aefb4f34b885a8927e1f13a2c64babd606264
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list