diff options
author | Joshua Colp <jcolp@digium.com> | 2014-03-10 12:53:00 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-03-10 12:53:00 +0000 |
commit | aa57dcf6341a9a6e91e93cda14258ea3ba48af60 (patch) | |
tree | ce0553a2af36267d2cf3bf96ac8b6bf2e8111ba5 /res/res_pjsip.c | |
parent | 3ff60b75b144d70034a768fc7d7da4537bf7cd7a (diff) |
AST-2014-003: res_pjsip: When handling 401/407 responses don't assume a request will have an endpoint.
This change removes the assumption that an outgoing request will always
have an endpoint and makes the authenticate_qualify option work once again.
(closes issue ASTERISK-23210)
Reported by: Joshua Colp
........
Merged revisions 410306 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r-- | res/res_pjsip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 4578e1047..650c68884 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -1850,7 +1850,7 @@ static void send_request_cb(void *token, pjsip_event *e) } AST_RWLIST_UNLOCK(&supplements); - if (tsx->status_code == 401 || tsx->status_code == 407) { + if ((tsx->status_code == 401 || tsx->status_code == 407) && req_data->endpoint) { if (!ast_sip_create_request_with_auth(&req_data->endpoint->outbound_auths, challenge, tsx, &tdata)) { pjsip_endpt_send_request(ast_sip_get_pjsip_endpoint(), tdata, -1, req_data->token, req_data->callback); } |