diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-06-02 12:51:31 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-06-07 13:16:18 -0500 |
commit | 993b769524b5e39aa5749a64e0389f01427235ee (patch) | |
tree | 434bad7ad93c7e9de5233dacbc992261df466b68 /res/res_pjsip | |
parent | ae8f6e996ec9052623cdf75d656112af8b8ccd05 (diff) |
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
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_distributor.c | 11 |
1 files changed, 10 insertions, 1 deletions
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)); |