summaryrefslogtreecommitdiff
path: root/pjsip/src/test/tsx_uac_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/src/test/tsx_uac_test.c')
-rw-r--r--pjsip/src/test/tsx_uac_test.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pjsip/src/test/tsx_uac_test.c b/pjsip/src/test/tsx_uac_test.c
index 0677da18..d978df80 100644
--- a/pjsip/src/test/tsx_uac_test.c
+++ b/pjsip/src/test/tsx_uac_test.c
@@ -220,10 +220,13 @@ static void tsx_user_on_tsx_state(pjsip_transaction *tsx, pjsip_event *e)
if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
/* Test the status code. */
- if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR) {
+ if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR &&
+ tsx->status_code != PJSIP_SC_BAD_GATEWAY)
+ {
PJ_LOG(3,(THIS_FILE,
- " error: status code is %d instead of %d",
- tsx->status_code, PJSIP_SC_TSX_TRANSPORT_ERROR));
+ " error: status code is %d instead of %d or %d",
+ tsx->status_code, PJSIP_SC_TSX_TRANSPORT_ERROR,
+ PJSIP_SC_BAD_GATEWAY));
test_complete = -720;
}
@@ -688,7 +691,7 @@ static pj_bool_t msg_receiver_on_rx_request(pjsip_rx_data *rdata)
tsx = pjsip_tsx_layer_find_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);
} else {
PJ_LOG(3,(THIS_FILE, " error: uac transaction not found!"));
test_complete = -633;
@@ -1027,7 +1030,7 @@ static int perform_tsx_test(int dummy, 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);