From b26d40d558f5be24bed5fb107cd4844f3cea1a03 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Tue, 1 Oct 2013 05:00:57 +0000 Subject: Fixed #1674: Deadlock when third party media employs external lock and ICE is active git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4606 74dad513-b988-da41-8d7b-12977e46ad98 --- pjnath/include/pjnath/ice_strans.h | 8 ++++++++ pjnath/include/pjnath/stun_session.h | 9 +++++++++ pjnath/include/pjnath/stun_sock.h | 10 ++++++++++ pjnath/include/pjnath/turn_session.h | 10 ++++++++++ pjnath/include/pjnath/turn_sock.h | 10 ++++++++++ 5 files changed, 47 insertions(+) (limited to 'pjnath/include') diff --git a/pjnath/include/pjnath/ice_strans.h b/pjnath/include/pjnath/ice_strans.h index fe38ff58..340bf605 100644 --- a/pjnath/include/pjnath/ice_strans.h +++ b/pjnath/include/pjnath/ice_strans.h @@ -564,6 +564,14 @@ PJ_DECL(pj_status_t) pj_ice_strans_get_options(pj_ice_strans *ice_st, PJ_DECL(pj_status_t) pj_ice_strans_set_options(pj_ice_strans *ice_st, const pj_ice_sess_options *opt); +/** + * Get the group lock for this ICE stream transport. + * + * @param ice_st The ICE stream transport. + * + * @return The group lock. + */ +PJ_DECL(pj_grp_lock_t *) pj_ice_strans_get_grp_lock(pj_ice_strans *ice_st); /** * Initialize the ICE session in the ICE stream transport. diff --git a/pjnath/include/pjnath/stun_session.h b/pjnath/include/pjnath/stun_session.h index 88dc78df..f8ea4d1d 100644 --- a/pjnath/include/pjnath/stun_session.h +++ b/pjnath/include/pjnath/stun_session.h @@ -434,6 +434,15 @@ PJ_DECL(pj_status_t) pj_stun_session_set_user_data(pj_stun_session *sess, */ PJ_DECL(void*) pj_stun_session_get_user_data(pj_stun_session *sess); +/** + * Get the group lock for this STUN session. + * + * @param sess The STUN session instance. + * + * @return The group lock. + */ +PJ_DECL(pj_grp_lock_t *) pj_stun_session_get_grp_lock(pj_stun_session *sess); + /** * Set SOFTWARE name to be included in all requests and responses. * diff --git a/pjnath/include/pjnath/stun_sock.h b/pjnath/include/pjnath/stun_sock.h index 081f36d5..a1123a1f 100644 --- a/pjnath/include/pjnath/stun_sock.h +++ b/pjnath/include/pjnath/stun_sock.h @@ -433,6 +433,16 @@ PJ_DECL(pj_status_t) pj_stun_sock_set_user_data(pj_stun_sock *stun_sock, PJ_DECL(void*) pj_stun_sock_get_user_data(pj_stun_sock *stun_sock); +/** + * Get the group lock for this STUN transport. + * + * @param stun_sock The STUN transport instance. + * + * @return The group lock. + */ +PJ_DECL(pj_grp_lock_t *) pj_stun_sock_get_grp_lock(pj_stun_sock *stun_sock); + + /** * Get the STUN transport info. The transport info contains, among other * things, the allocated relay address. diff --git a/pjnath/include/pjnath/turn_session.h b/pjnath/include/pjnath/turn_session.h index d3adc79b..e4ae4d7b 100644 --- a/pjnath/include/pjnath/turn_session.h +++ b/pjnath/include/pjnath/turn_session.h @@ -512,6 +512,16 @@ PJ_DECL(pj_status_t) pj_turn_session_set_user_data(pj_turn_session *sess, PJ_DECL(void*) pj_turn_session_get_user_data(pj_turn_session *sess); +/** + * Get the group lock for this TURN session. + * + * @param sess The TURN client session. + * + * @return The group lock. + */ +PJ_DECL(pj_grp_lock_t *) pj_turn_session_get_grp_lock(pj_turn_session *sess); + + /** * Configure message logging. By default all flags are enabled. * diff --git a/pjnath/include/pjnath/turn_sock.h b/pjnath/include/pjnath/turn_sock.h index eddac515..bbff6bf7 100644 --- a/pjnath/include/pjnath/turn_sock.h +++ b/pjnath/include/pjnath/turn_sock.h @@ -264,6 +264,16 @@ PJ_DECL(pj_status_t) pj_turn_sock_set_user_data(pj_turn_sock *turn_sock, PJ_DECL(void*) pj_turn_sock_get_user_data(pj_turn_sock *turn_sock); +/** + * Get the group lock for this TURN transport. + * + * @param turn_sock The TURN transport instance. + * + * @return The group lock. + */ +PJ_DECL(pj_grp_lock_t *) pj_turn_sock_get_grp_lock(pj_turn_sock *turn_sock); + + /** * Get the TURN transport info. The transport info contains, among other * things, the allocated relay address. -- cgit v1.2.3