Ignore:
Timestamp:
Mar 5, 2013 11:59:54 AM (8 years ago)
Author:
bennylp
Message:

Implementation of Re #1628: Modify SIP transaction to use group lock to avoid deadlock etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/test/tsx_uac_test.c

    r4208 r4420  
    221221 
    222222            /* Test the status code. */ 
    223             if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR) { 
    224                 PJ_LOG(3,(THIS_FILE,  
    225                           "    error: status code is %d instead of %d", 
    226                           tsx->status_code, PJSIP_SC_TSX_TRANSPORT_ERROR)); 
     223            if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR && 
     224                tsx->status_code != PJSIP_SC_BAD_GATEWAY) 
     225            { 
     226                PJ_LOG(3,(THIS_FILE,  
     227                          "    error: status code is %d instead of %d or %d", 
     228                          tsx->status_code, PJSIP_SC_TSX_TRANSPORT_ERROR, 
     229                          PJSIP_SC_BAD_GATEWAY)); 
    227230                test_complete = -720; 
    228231            } 
     
    689692            if (tsx) { 
    690693                pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED); 
    691                 pj_mutex_unlock(tsx->mutex); 
     694                pj_grp_lock_release(tsx->grp_lock); 
    692695            } else { 
    693696                PJ_LOG(3,(THIS_FILE, "    error: uac transaction not found!")); 
     
    10281031        if (tsx) { 
    10291032            pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED); 
    1030             pj_mutex_unlock(tsx->mutex); 
     1033            pj_grp_lock_release(tsx->grp_lock); 
    10311034            flush_events(1000); 
    10321035        } 
Note: See TracChangeset for help on using the changeset viewer.