Changeset 4448
- Timestamp:
- Mar 21, 2013 11:38:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r4446 r4448 1921 1921 pjsip_transaction *tsx = (pjsip_transaction*) token; 1922 1922 1923 /* In other circumstances, locking tsx->grp_lock AFTER transport mutex 1924 * will introduce deadlock if another thread is currently sending a 1925 * SIP message to the transport. But this should be safe as there should 1926 * be no way this callback could be called while another thread is 1927 * sending a message. 1928 */ 1929 pj_grp_lock_acquire(tsx->grp_lock); 1930 tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT); 1931 pj_grp_lock_release(tsx->grp_lock); 1932 1923 1933 if (sent < 0) { 1924 1934 pj_time_val delay = {0, 0}; 1925 1935 char errmsg[PJ_ERR_MSG_SIZE]; 1926 pj_str_t err; 1927 1928 err = pj_strerror(-sent, errmsg, sizeof(errmsg)); 1936 1937 pj_strerror(-sent, errmsg, sizeof(errmsg)); 1929 1938 1930 1939 PJ_LOG(2,(tsx->obj_name, "Transport failed to send %s! Err=%d (%s)", … … 2002 2011 */ 2003 2012 pj_grp_lock_add_ref(tsx->grp_lock); 2013 tsx->transport_flag |= TSX_HAS_PENDING_TRANSPORT; 2004 2014 2005 2015 status = pjsip_transport_send( tsx->transport, tdata, &tsx->addr, … … 2010 2020 else { 2011 2021 /* Operation completes immediately */ 2022 tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT); 2012 2023 pj_grp_lock_dec_ref(tsx->grp_lock); 2013 2024 }
Note: See TracChangeset
for help on using the changeset viewer.