From: Joshua Colp Date: Thu, 19 Dec 2013 17:58:46 +0000 (+0000) Subject: res_pjsip: Ignore 401/407 responses for transactions and dialogs we don't know about. X-Git-Tag: 12.0.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28a77070950eb943b0aa32f1c5352f6c70af179f;p=thirdparty%2Fasterisk.git res_pjsip: Ignore 401/407 responses for transactions and dialogs we don't know about. Under normal conditions it is unlikely we will ever receive a response for a transaction or dialog we don't know about but if any are received ignore them. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404371 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip/pjsip_outbound_auth.c b/res/res_pjsip/pjsip_outbound_auth.c index 5996d919bc..28ca3ec8a2 100644 --- a/res/res_pjsip/pjsip_outbound_auth.c +++ b/res/res_pjsip/pjsip_outbound_auth.c @@ -54,9 +54,11 @@ static pj_bool_t outbound_auth(pjsip_rx_data *rdata) tsx = pjsip_rdata_get_tsx(rdata); dlg = pjsip_rdata_get_dlg(rdata); - ast_assert(dlg != NULL && tsx != NULL); - endpoint = ast_sip_dialog_get_endpoint(dlg); + if (!dlg || !tsx) { + return PJ_FALSE; + } + endpoint = ast_sip_dialog_get_endpoint(dlg); if (!endpoint) { return PJ_FALSE; }