diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-02-18 02:12:22 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-02-18 02:12:22 +0000 |
commit | af0b29f972d2b03778daa66048a124428eb8d3d0 (patch) | |
tree | 106ae8a5ed3c1b6b3522fb5f28a4df7ce27659b3 /pjsip/src/pjsua-lib | |
parent | 5e23d504cd6a1da1d8bfc8365b3c4dbcd3c184f9 (diff) |
Fixed #1452: Wrong call media state is reported if hold request is challenged with authentication (thanks Bogdan Krakowski for the fix)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3954 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 532bc12b..ed25da59 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -4326,6 +4326,18 @@ static void pjsua_call_on_tsx_state_changed(pjsip_inv_session *inv, return; } + /* https://trac.pjsip.org/repos/ticket/1452: + * If a request is retried due to 401/407 challenge, don't process the + * transaction first but wait until we've retried it. + */ + if (tsx->role == PJSIP_ROLE_UAC && + (tsx->status_code==401 || tsx->status_code==407) && + tsx->last_tx && tsx->last_tx->auth_retry) + { + PJSUA_UNLOCK(); + return; + } + /* Notify application callback first */ if (pjsua_var.ua_cfg.cb.on_call_tsx_state) { (*pjsua_var.ua_cfg.cb.on_call_tsx_state)(call->index, tsx, e); |