Changeset 4606 for pjproject


Ignore:
Timestamp:
Oct 1, 2013 5:00:57 AM (9 years ago)
Author:
ming
Message:

Fixed #1674: Deadlock when third party media employs external lock and ICE is active

Location:
pjproject/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h

    r4350 r4606  
    222222                                         pjmedia_transport **p_tp); 
    223223 
     224/** 
     225 * Get the group lock for the ICE media transport. 
     226 * 
     227 * @param tp            The ICE media transport. 
     228 * 
     229 * @return              The group lock. 
     230 */ 
     231PJ_DECL(pj_grp_lock_t *) pjmedia_ice_get_grp_lock(pjmedia_transport *tp); 
     232 
    224233PJ_END_DECL 
    225234 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c

    r4538 r4606  
    284284} 
    285285 
     286PJ_DEF(pj_grp_lock_t *) pjmedia_ice_get_grp_lock(pjmedia_transport *tp) 
     287{ 
     288    PJ_ASSERT_RETURN(tp, NULL); 
     289    return pj_ice_strans_get_grp_lock(((struct transport_ice *)tp)->ice_st); 
     290} 
     291 
    286292/* Disable ICE when SDP from remote doesn't contain a=candidate line */ 
    287293static void set_no_ice(struct transport_ice *tp_ice, const char *reason, 
  • pjproject/trunk/pjnath/include/pjnath/ice_strans.h

    r4538 r4606  
    565565                                               const pj_ice_sess_options *opt); 
    566566 
     567/** 
     568 * Get the group lock for this ICE stream transport. 
     569 * 
     570 * @param ice_st        The ICE stream transport. 
     571 * 
     572 * @return              The group lock. 
     573 */ 
     574PJ_DECL(pj_grp_lock_t *) pj_ice_strans_get_grp_lock(pj_ice_strans *ice_st); 
    567575 
    568576/** 
  • pjproject/trunk/pjnath/include/pjnath/stun_session.h

    r4360 r4606  
    436436 
    437437/** 
     438 * Get the group lock for this STUN session. 
     439 * 
     440 * @param sess      The STUN session instance. 
     441 * 
     442 * @return          The group lock. 
     443 */ 
     444PJ_DECL(pj_grp_lock_t *) pj_stun_session_get_grp_lock(pj_stun_session *sess); 
     445 
     446/** 
    438447 * Set SOFTWARE name to be included in all requests and responses. 
    439448 * 
  • pjproject/trunk/pjnath/include/pjnath/stun_sock.h

    r4538 r4606  
    435435 
    436436/** 
     437 * Get the group lock for this STUN transport. 
     438 * 
     439 * @param stun_sock     The STUN transport instance. 
     440 * 
     441 * @return              The group lock. 
     442 */ 
     443PJ_DECL(pj_grp_lock_t *) pj_stun_sock_get_grp_lock(pj_stun_sock *stun_sock); 
     444 
     445 
     446/** 
    437447 * Get the STUN transport info. The transport info contains, among other 
    438448 * things, the allocated relay address. 
  • pjproject/trunk/pjnath/include/pjnath/turn_session.h

    r4360 r4606  
    514514 
    515515/** 
     516 * Get the group lock for this TURN session. 
     517 * 
     518 * @param sess          The TURN client session. 
     519 * 
     520 * @return              The group lock. 
     521 */ 
     522PJ_DECL(pj_grp_lock_t *) pj_turn_session_get_grp_lock(pj_turn_session *sess); 
     523 
     524 
     525/** 
    516526 * Configure message logging. By default all flags are enabled. 
    517527 * 
  • pjproject/trunk/pjnath/include/pjnath/turn_sock.h

    r4538 r4606  
    263263 */ 
    264264PJ_DECL(void*) pj_turn_sock_get_user_data(pj_turn_sock *turn_sock); 
     265 
     266 
     267/** 
     268 * Get the group lock for this TURN transport. 
     269 * 
     270 * @param turn_sock     The TURN transport instance. 
     271 * 
     272 * @return              The group lock. 
     273 */ 
     274PJ_DECL(pj_grp_lock_t *) pj_turn_sock_get_grp_lock(pj_turn_sock *turn_sock); 
    265275 
    266276 
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r4602 r4606  
    798798} 
    799799 
     800/** 
     801 * Get the group lock for this ICE stream transport. 
     802 */ 
     803PJ_DEF(pj_grp_lock_t *) pj_ice_strans_get_grp_lock(pj_ice_strans *ice_st) 
     804{ 
     805    PJ_ASSERT_RETURN(ice_st, NULL); 
     806    return ice_st->grp_lock; 
     807} 
     808 
    800809/* 
    801810 * Create ICE! 
  • pjproject/trunk/pjnath/src/pjnath/stun_session.c

    r4537 r4606  
    622622} 
    623623 
     624PJ_DEF(pj_grp_lock_t *) pj_stun_session_get_grp_lock(pj_stun_session *sess) 
     625{ 
     626    PJ_ASSERT_RETURN(sess, NULL); 
     627    return sess->grp_lock; 
     628} 
     629 
    624630PJ_DEF(pj_status_t) pj_stun_session_set_software_name(pj_stun_session *sess, 
    625631                                                      const pj_str_t *sw) 
  • pjproject/trunk/pjnath/src/pjnath/stun_sock.c

    r4538 r4606  
    529529} 
    530530 
     531/* Get group lock */ 
     532PJ_DECL(pj_grp_lock_t *) pj_stun_sock_get_grp_lock(pj_stun_sock *stun_sock) 
     533{ 
     534    PJ_ASSERT_RETURN(stun_sock, NULL); 
     535    return stun_sock->grp_lock; 
     536} 
     537 
    531538/* Notify application that session has failed */ 
    532539static pj_bool_t sess_fail(pj_stun_sock *stun_sock,  
  • pjproject/trunk/pjnath/src/pjnath/turn_session.c

    r4551 r4606  
    526526} 
    527527 
     528/** 
     529 * Get group lock. 
     530 */ 
     531PJ_DEF(pj_grp_lock_t *) pj_turn_session_get_grp_lock(pj_turn_session *sess) 
     532{ 
     533    PJ_ASSERT_RETURN(sess, NULL); 
     534    return sess->grp_lock; 
     535} 
    528536 
    529537/* 
  • pjproject/trunk/pjnath/src/pjnath/turn_sock.c

    r4538 r4606  
    323323    PJ_ASSERT_RETURN(turn_sock, NULL); 
    324324    return turn_sock->user_data; 
     325} 
     326 
     327/* 
     328 * Get group lock. 
     329 */ 
     330PJ_DEF(pj_grp_lock_t *) pj_turn_sock_get_grp_lock(pj_turn_sock *turn_sock) 
     331{ 
     332    PJ_ASSERT_RETURN(turn_sock, NULL); 
     333    return turn_sock->grp_lock; 
    325334} 
    326335 
Note: See TracChangeset for help on using the changeset viewer.