diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-01-05 23:35:46 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-01-05 23:35:46 +0000 |
commit | 67d6a30732fd1e1fae2f98f646d97356b2eaa8c9 (patch) | |
tree | 599de20e4a6554656db42030cdce7c1f2ccdb655 /pjsip/src/test-pjsip/transport_udp_test.c | |
parent | 944562492d0c16b9e44ec4e1cc97657846d82cd0 (diff) |
Added loop transport to test transaction
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@107 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/test-pjsip/transport_udp_test.c')
-rw-r--r-- | pjsip/src/test-pjsip/transport_udp_test.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pjsip/src/test-pjsip/transport_udp_test.c b/pjsip/src/test-pjsip/transport_udp_test.c index 1af74ed0..0fdbddae 100644 --- a/pjsip/src/test-pjsip/transport_udp_test.c +++ b/pjsip/src/test-pjsip/transport_udp_test.c @@ -76,13 +76,15 @@ int transport_udp_test(void) /* Basic transport's send/receive loopback test. */ pj_sockaddr_in_init(&rem_addr, pj_cstr(&s, "127.0.0.1"), TEST_UDP_PORT); for (i=0; i<SEND_RECV_LOOP; ++i) { - status = transport_send_recv_test(PJSIP_TRANSPORT_UDP, tp, &rem_addr); + status = transport_send_recv_test(PJSIP_TRANSPORT_UDP, tp, + "sip:alice@127.0.0.1:"TEST_UDP_PORT_STR); if (status != 0) return status; } /* Multi-threaded round-trip test. */ - status = transport_rt_test(PJSIP_TRANSPORT_UDP, tp, &rem_addr); + status = transport_rt_test(PJSIP_TRANSPORT_UDP, tp, + "sip:alice@127.0.0.1:"TEST_UDP_PORT_STR); if (status != 0) return status; @@ -93,6 +95,12 @@ int transport_udp_test(void) /* Destroy this transport. */ pjsip_transport_dec_ref(udp_tp); + /* Force destroy this transport. */ + status = pjsip_transport_unregister( pjsip_endpt_get_tpmgr(endpt), udp_tp); + if (status != PJ_SUCCESS) + return -90; + + /* Done */ return 0; } |