diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-06-09 18:47:07 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-06-09 18:47:07 -0500 |
commit | 54be8fd14988151d0c504d9127a4231da93d5ed8 (patch) | |
tree | 2665597fe966967ee5bd477d897ebb1ab9758f00 | |
parent | 8438315428ce44b956c4f38e84ff982d04951cfe (diff) | |
parent | 993b769524b5e39aa5749a64e0389f01427235ee (diff) |
Merge "pjsip_distributor.c: Ignore messages until fully booted." into 13
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | res/res_pjsip/pjsip_distributor.c | 11 |
2 files changed, 13 insertions, 1 deletions
@@ -52,6 +52,9 @@ res_pjsip into the "reg_server" field in the ps_contacts table to facilitate multi-server setups. + * When starting Asterisk, received traffic will now be ignored until Asterisk + has loaded all modules and is fully booted. + res_hep ------------------ * Added a new option, 'uuid_type', that sets the preferred source of the Homer diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c index 3867eaea0..288a3e00a 100644 --- a/res/res_pjsip/pjsip_distributor.c +++ b/res/res_pjsip/pjsip_distributor.c @@ -290,11 +290,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, pjsip_rx_data_get_info(rdata)); |