]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pjsip_distributor.c: Ignore messages until fully booted. 78/2978/1
authorRichard Mudgett <rmudgett@digium.com>
Thu, 2 Jun 2016 17:51:31 +0000 (12:51 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 8 Jun 2016 22:00:29 +0000 (17:00 -0500)
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

CHANGES
res/res_pjsip/pjsip_distributor.c

diff --git a/CHANGES b/CHANGES
index 7314549702decd9e0fc16366f12f9294a41c1519..8258b25f1dde4e2894b9e82a6050b2db22547814 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,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 --
 ------------------------------------------------------------------------------
index 79c191651034ddb7b47dc5643857f1f6679043b5..75cb609f68c9206aa252e06d80c9252616c7a7fa 100644 (file)
@@ -253,11 +253,20 @@ static pjsip_module endpoint_mod = {
 
 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);