diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-04-06 10:29:20 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-04-06 10:29:20 +0000 |
commit | d73e5c4efb3ce395e82ef7f4f88afc2b57e52230 (patch) | |
tree | c1908636940a79cd1426b6db41340f87b2c290fe /pjsip/src/test-pjsip | |
parent | beddeea87ffeabce44354b7016578f577d7887dc (diff) |
Fixed ticket #216: Build error when PJ_HAS_TCP is set to zero (thanks ChenHuan)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1159 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/test-pjsip')
-rw-r--r-- | pjsip/src/test-pjsip/test.c | 6 | ||||
-rw-r--r-- | pjsip/src/test-pjsip/transport_tcp_test.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/pjsip/src/test-pjsip/test.c b/pjsip/src/test-pjsip/test.c index 62360756..62e3aed3 100644 --- a/pjsip/src/test-pjsip/test.c +++ b/pjsip/src/test-pjsip/test.c @@ -226,8 +226,10 @@ int test_main(void) #if INCLUDE_TSX_TEST unsigned i; pjsip_transport *tp; +#if PJ_HAS_TCP pjsip_tpfactory *tpfactory; -#endif +#endif /* PJ_HAS_TCP */ +#endif /* INCLUDE_TSX_TEST */ int line; pj_log_set_level(log_level); @@ -331,6 +333,7 @@ int test_main(void) ++tsx_test_cnt; } +#if PJ_HAS_TCP status = pjsip_tcp_transport_start(endpt, NULL, 1, &tpfactory); if (status == PJ_SUCCESS) { tsx_test[tsx_test_cnt].port = tpfactory->addr_name.port; @@ -342,6 +345,7 @@ int test_main(void) rc = -4; goto on_return; } +#endif for (i=0; i<tsx_test_cnt; ++i) { diff --git a/pjsip/src/test-pjsip/transport_tcp_test.c b/pjsip/src/test-pjsip/transport_tcp_test.c index 1835f1d5..50b59afe 100644 --- a/pjsip/src/test-pjsip/transport_tcp_test.c +++ b/pjsip/src/test-pjsip/transport_tcp_test.c @@ -27,6 +27,7 @@ /* * TCP transport test. */ +#if PJ_HAS_TCP int transport_tcp_test(void) { enum { SEND_RECV_LOOP = 8 }; @@ -141,3 +142,9 @@ int transport_tcp_test(void) /* Done */ return 0; } +#else /* PJ_HAS_TCP */ +int transport_tcp_test(void) +{ + return 0; +} +#endif /* PJ_HAS_TCP */ |