Ignore:
Timestamp:
Mar 29, 2017 2:40:48 AM (4 years ago)
Author:
ming
Message:

Fixed #2002: Deadlock between PJSUA LOCK, transaction group lock, and UA mutex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_transaction.h

    r4420 r5573  
    180180 * is created by calling #pjsip_tsx_create_key() from an incoming message. 
    181181 * 
     182 * IMPORTANT: To prevent deadlock, application should use 
     183 * #pjsip_tsx_layer_find_tsx2() instead which only adds a reference to 
     184 * the transaction instead of locking it. 
     185 * 
    182186 * @param key       The key string to find the transaction. 
    183187 * @param lock      If non-zero, transaction will be locked before the 
     
    190194PJ_DECL(pjsip_transaction*) pjsip_tsx_layer_find_tsx( const pj_str_t *key, 
    191195                                                      pj_bool_t lock ); 
     196 
     197/** 
     198 * Find a transaction with the specified key. The transaction key normally 
     199 * is created by calling #pjsip_tsx_create_key() from an incoming message. 
     200 * 
     201 * @param key       The key string to find the transaction. 
     202 * @param add_ref   If non-zero, transaction's reference will be added 
     203 *                  by one before the function returns, to make sure that 
     204 *                  it's not deleted by other threads. 
     205 * 
     206 * @return          The matching transaction instance, or NULL if transaction 
     207 *                  can not be found. 
     208 */ 
     209PJ_DECL(pjsip_transaction*) pjsip_tsx_layer_find_tsx2( const pj_str_t *key, 
     210                                                       pj_bool_t add_ref ); 
    192211 
    193212/** 
Note: See TracChangeset for help on using the changeset viewer.