]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pjsip_distributor.c: Ignore messages until fully booted. 93/2993/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 18:46:04 +0000 (13:46 -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 d529e277cf02176316e72ccc7eaa97c59bef49e4..16827761d2c442649e0eedb4e6b6a1aafba74215 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,7 +9,7 @@
 ==============================================================================
 
 ------------------------------------------------------------------------------
---- Functionality changes from Asterisk 13.9.0 to Asterisk 13.10.0 -----------
+--- Functionality changes from Asterisk 13.8.0 to Asterisk 13.8-cert1 --------
 ------------------------------------------------------------------------------
 
 res_odbc
@@ -18,16 +18,15 @@ res_odbc
    of concurrent connections to the database. This option defaults to 1 which
    returns the behavior to that of Asterisk 13.7 and prior.
 
-------------------------------------------------------------------------------
---- Functionality changes from Asterisk 13.8.0 to Asterisk 13.9.0 ------------
-------------------------------------------------------------------------------
-
 res_pjsip
 ------------------
  * Added new global option (disable_multi_domain) to pjsip.
    Disabling Multi Domain can improve realtime performace by reducing
    number of database requsts.
 
+ * When starting Asterisk, received traffic will now be ignored until Asterisk
+   has loaded all modules and is fully booted.
+
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 13.7.0 to Asterisk 13.8.0 ------------
 ------------------------------------------------------------------------------
index 834ca10d39f165c9cc78d4578420944448df6045..c7cfd8251b396a1269cbb2bf679292c48fbb1115 100644 (file)
@@ -254,11 +254,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);