Changeset 64 for pjproject/trunk/pjsip/src/test-pjsip/test.c
- Timestamp:
- Nov 20, 2005 7:58:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/test.c
- Property svn:keyword set to Id
r61 r64 47 47 } 48 48 49 pj_status_t register_static_modules(pj_size_t *count, pjsip_module **modules) 50 { 51 *count = 0; 52 return PJ_SUCCESS; 53 } 49 54 50 51 int main() 55 int test_main(void) 52 56 { 53 57 pj_status_t rc; 58 pj_caching_pool caching_pool; 59 const char *filename; 60 int line; 61 62 pj_log_set_level(3); 63 pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | 64 PJ_LOG_HAS_MICRO_SEC); 54 65 55 66 if ((rc=pj_init()) != PJ_SUCCESS) { 56 67 app_perror("pj_init", rc); 68 return rc; 57 69 } 58 70 59 DO_TEST(parse_uri()); 60 DO_TEST(parse_msg()); 71 pj_dump_config(); 72 73 pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); 74 75 rc = pjsip_endpt_create(&caching_pool.factory, "endpt", &endpt); 76 if (rc != PJ_SUCCESS) { 77 app_perror("pjsip_endpt_create", rc); 78 pj_caching_pool_destroy(&caching_pool); 79 return rc; 80 } 81 82 PJ_LOG(3,("","")); 83 84 DO_TEST(uri_test()); 61 85 62 86 on_return: 87 88 pjsip_endpt_destroy(endpt); 89 pj_caching_pool_destroy(&caching_pool); 90 91 PJ_LOG(3,("test", "")); 92 93 pj_thread_get_stack_info(pj_thread_this(), &filename, &line); 94 PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u", 95 pj_thread_get_stack_max_usage(pj_thread_this()), 96 filename, line)); 97 if (rc == 0) 98 PJ_LOG(3,("test", "Looks like everything is okay!..")); 99 else 100 PJ_LOG(3,("test", "Test completed with error(s)")); 101 63 102 return 0; 64 103 }
Note: See TracChangeset
for help on using the changeset viewer.