Changeset 1049 for pjproject/trunk/pjlib-util/src/pjstun-srv-test/main.c
- Timestamp:
- Mar 8, 2007 6:58:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjstun-srv-test/main.c
r1040 r1049 18 18 */ 19 19 #include "server.h" 20 21 #define THIS_FILE "main.c" 20 22 21 23 struct options … … 42 44 43 45 44 static void server_main( void)46 static void server_main(pj_stun_server *srv) 45 47 { 46 48 int quit = 0; … … 50 52 51 53 printf("Menu:\n" 54 " d Dump status\n" 52 55 " q Quit\n" 53 56 "Choice:"); 54 57 55 58 fgets(line, sizeof(line), stdin); 56 if (line[0] == 'q') 59 if (line[0] == 'q') { 57 60 quit = 1; 61 } else if (line[0] == 'd') { 62 pj_stun_server_info *si = pj_stun_server_get_info(srv); 63 pj_pool_factory_dump(si->pf, PJ_TRUE); 64 } 58 65 } 59 66 } … … 72 79 pj_caching_pool cp; 73 80 pj_stun_server *srv; 74 pj_stun_usage *bu;75 81 pj_status_t status; 76 82 … … 117 123 } 118 124 119 status = pj_stun_bind_usage_create(srv, NULL, 3478, &bu);125 status = pj_stun_bind_usage_create(srv, NULL, 3478, NULL); 120 126 if (status != PJ_SUCCESS) { 121 127 pj_stun_perror(THIS_FILE, "Unable to create bind usage", status); … … 123 129 } 124 130 125 server_main( );131 server_main(srv); 126 132 127 pj_stun_usage_destroy(bu);128 133 pj_stun_server_destroy(srv); 129 134 pj_pool_factory_dump(&cp.factory, PJ_TRUE);
Note: See TracChangeset
for help on using the changeset viewer.