summaryrefslogtreecommitdiff
path: root/pjsip/src/test/tsx_uas_test.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2013-03-05 11:59:54 +0000
committerBenny Prijono <bennylp@teluu.com>2013-03-05 11:59:54 +0000
commit22da209226aac2c65f45900e55cf5f162cd311d4 (patch)
tree6ab301e7c4b749be0683e50760c8b50da1c9e5e2 /pjsip/src/test/tsx_uas_test.c
parent1f3242dc1324388f45e1ed939d7656352dd92f7e (diff)
Implementation of Re #1628: Modify SIP transaction to use group lock to avoid deadlock etc.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4420 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/test/tsx_uas_test.c')
-rw-r--r--pjsip/src/test/tsx_uas_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pjsip/src/test/tsx_uas_test.c b/pjsip/src/test/tsx_uas_test.c
index 973f3315..3c43f535 100644
--- a/pjsip/src/test/tsx_uas_test.c
+++ b/pjsip/src/test/tsx_uas_test.c
@@ -225,12 +225,12 @@ static void send_response_timer( pj_timer_heap_t *timer_heap,
if (status != PJ_SUCCESS) {
// Some tests do expect failure!
//PJ_LOG(3,(THIS_FILE," error: timer unable to send response"));
- pj_mutex_unlock(tsx->mutex);
+ pj_grp_lock_release(tsx->grp_lock);
pjsip_tx_data_dec_ref(r->tdata);
return;
}
- pj_mutex_unlock(tsx->mutex);
+ pj_grp_lock_release(tsx->grp_lock);
}
/* Utility to send response. */
@@ -313,7 +313,7 @@ static void terminate_our_tsx(int status_code)
}
pjsip_tsx_terminate(tsx, status_code);
- pj_mutex_unlock(tsx->mutex);
+ pj_grp_lock_release(tsx->grp_lock);
}
#if 0 /* Unused for now */
@@ -1259,7 +1259,7 @@ static int perform_test( char *target_uri, char *from_uri,
tsx = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_TRUE);
if (tsx) {
pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
- pj_mutex_unlock(tsx->mutex);
+ pj_grp_lock_release(tsx->grp_lock);
flush_events(1000);
}
pjsip_tx_data_dec_ref(tdata);