diff options
Diffstat (limited to 'pjlib/src/pjlib-test/test.c')
-rw-r--r-- | pjlib/src/pjlib-test/test.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/pjlib/src/pjlib-test/test.c b/pjlib/src/pjlib-test/test.c index 94d77bfb..2015b18b 100644 --- a/pjlib/src/pjlib-test/test.c +++ b/pjlib/src/pjlib-test/test.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* +/* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> * @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "test.h" #include <pjlib.h> @@ -38,7 +38,7 @@ pj_pool_factory *mem; int param_echo_sock_type; const char *param_echo_server = ECHO_SERVER_ADDRESS; int param_echo_port = ECHO_SERVER_START_PORT; -int param_log_decor = PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | +int param_log_decor = PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC; int null_func() @@ -63,7 +63,7 @@ int test_inner(void) app_perror("pj_init() error!!", rc); return rc; } - + //pj_dump_config(); pj_caching_pool_init( &caching_pool, NULL, 0 ); @@ -98,7 +98,7 @@ int test_inner(void) #if INCLUDE_STRING_TEST DO_TEST( string_test() ); #endif - + #if INCLUDE_FIFOBUF_TEST DO_TEST( fifobuf_test() ); #endif @@ -184,8 +184,8 @@ int test_inner(void) if (param_echo_sock_type == 0) param_echo_sock_type = pj_SOCK_DGRAM(); - echo_client( param_echo_sock_type, - param_echo_server, + echo_client( param_echo_sock_type, + param_echo_server, param_echo_port); #endif @@ -196,18 +196,18 @@ on_return: pj_caching_pool_destroy( &caching_pool ); PJ_LOG(3,("test", "")); - + pj_thread_get_stack_info(pj_thread_this(), &filename, &line); - PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u", + PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u", pj_thread_get_stack_max_usage(pj_thread_this()), filename, line)); if (rc == 0) PJ_LOG(3,("test", "Looks like everything is okay!..")); else PJ_LOG(3,("test", "Test completed with error(s)")); - + pj_shutdown(); - + return 0; } @@ -217,14 +217,12 @@ int test_main(void) { PJ_USE_EXCEPTION; - pj_AF_INET(); - PJ_TRY { return test_inner(); } PJ_CATCH_ANY { int id = PJ_GET_EXCEPTION(); - PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", + PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", id, pj_exception_id_name(id))); } PJ_END; |