diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-04-29 12:38:25 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-04-29 12:38:25 +0000 |
commit | 48a492ee742bc593bc332cd5176d0c33b1a13604 (patch) | |
tree | 8f83ce3fa0966a9708d1e8f2530341c4bf43bee7 /pjsip | |
parent | 9bd0000b4eba8b96af12366f55d84d3a59130d1a (diff) |
Fixed bug in event subscription when it is challenged/authenticated
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@424 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsip-simple/evsub.c | 8 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 14 | ||||
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_pres.c | 3 |
3 files changed, 9 insertions, 16 deletions
diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c index 9a9b852d..7b13d548 100644 --- a/pjsip/src/pjsip-simple/evsub.c +++ b/pjsip/src/pjsip-simple/evsub.c @@ -1355,10 +1355,6 @@ static pjsip_evsub *on_new_transaction( pjsip_transaction *tsx, sub->pending_sub = tsx; - } else if (tsx == sub->pending_sub && - tsx->state >= PJSIP_TSX_STATE_COMPLETED) - { - sub->pending_sub = NULL; } return sub; @@ -1468,6 +1464,10 @@ static void on_tsx_state_uac( pjsip_evsub *sub, pjsip_transaction *tsx, return; } + /* Clear pending subscription */ + if (tsx == sub->pending_sub) + sub->pending_sub = NULL; + /* Handle authentication. */ if (tsx->status_code==401 || tsx->status_code==407) { pjsip_tx_data *tdata; diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index 034262ab..35309323 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -683,19 +683,9 @@ static pj_status_t init_media(void) #endif /* PJMEDIA_HAS_L16_CODEC */ - /* If user specifies the exact codec to be used, then disable all codecs - * and only enable those specific codecs. + /* Enable those codecs that user put with "--add-codec", and move + * the priority to top */ - if (pjsua.codec_cnt != 0) { - codec_id = pj_str(""); - pjmedia_codec_mgr_set_codec_priority( - pjmedia_endpt_get_codec_mgr(pjsua.med_endpt), - &codec_id, - PJMEDIA_CODEC_PRIO_DISABLED); - } - - - for (i=0; i<pjsua.codec_cnt; ++i) { pjmedia_codec_mgr_set_codec_priority( pjmedia_endpt_get_codec_mgr(pjsua.med_endpt), diff --git a/pjsip/src/pjsua-lib/pjsua_pres.c b/pjsip/src/pjsua-lib/pjsua_pres.c index f0774d5f..b77871f9 100644 --- a/pjsip/src/pjsua-lib/pjsua_pres.c +++ b/pjsip/src/pjsua-lib/pjsua_pres.c @@ -323,6 +323,9 @@ static void subscribe_buddy_presence(unsigned index) return; } + pjsip_auth_clt_set_credentials( &dlg->auth_sess, pjsua.cred_count, + pjsua.cred_info); + status = pjsip_pres_create_uac( dlg, &pres_callback, &pjsua.buddies[index].sub); if (status != PJ_SUCCESS) { |