diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-10-20 14:44:00 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-10-20 14:44:00 +0000 |
commit | 64bd1d034dd71b2896da1c74103861f9b8ce331e (patch) | |
tree | d279b57b3843bdbd2e29f9b6b9969f1f8c2a66ba /pjmedia | |
parent | 89547e9f9d2eff5aa4dd7bbd212ebd7cee8b4e96 (diff) |
Fixed ticket #977: ICE does not change role to Controlling when talking to ice-lite agents (thanks Amaresh Marekar for the report)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2957 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/src/pjmedia/transport_ice.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pjmedia/src/pjmedia/transport_ice.c b/pjmedia/src/pjmedia/transport_ice.c index 7fd0133e..9cf425a2 100644 --- a/pjmedia/src/pjmedia/transport_ice.c +++ b/pjmedia/src/pjmedia/transport_ice.c @@ -1147,7 +1147,9 @@ static pj_status_t transport_encode_sdp(pjmedia_transport *tp, pj_status_t status; /* Validate media transport */ - /* For now, this transport only support RTP/AVP transport */ + /* This transport only support RTP/AVP transport, unless if + * transport checking is disabled + */ if ((tp_ice->media_option & PJMEDIA_TPMED_NO_TRANSPORT_CHECKING) == 0) { pjmedia_sdp_media *loc_m, *rem_m; @@ -1410,6 +1412,17 @@ static pj_status_t transport_media_start(pjmedia_transport *tp, } } + /* Ticket #977: Update role if turns out we're supposed to be the + * Controlling agent (e.g. when talking to ice-lite peer). + */ + if (tp_ice->rem_offer_state.local_role==PJ_ICE_SESS_ROLE_CONTROLLING && + pj_ice_strans_has_sess(tp_ice->ice_st)) + { + pj_ice_strans_change_role(tp_ice->ice_st, + PJ_ICE_SESS_ROLE_CONTROLLING); + } + + /* start ICE */ } |