Changeset 2892
- Timestamp:
- Aug 17, 2009 3:33:45 PM (15 years ago)
- Location:
- pjproject/trunk/pjsip-apps/src/pjsua
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/main.c
r2407 r2892 24 24 25 25 /* 26 * These are defined in pjsua .c.26 * These are defined in pjsua_app.c. 27 27 */ 28 extern pj_bool_t app_restart; 28 29 pj_status_t app_init(int argc, char *argv[]); 29 30 pj_status_t app_main(void); … … 76 77 int main(int argc, char *argv[]) 77 78 { 78 if (app_init(argc, argv) != PJ_SUCCESS)79 return 1;79 do { 80 app_restart = PJ_FALSE; 80 81 81 setup_signal_handler(); 82 if (app_init(argc, argv) != PJ_SUCCESS) 83 return 1; 82 84 83 app_main(); 84 app_destroy(); 85 setup_signal_handler(); 85 86 86 /* This is on purpose */ 87 app_destroy(); 87 app_main(); 88 app_destroy(); 89 90 /* This is on purpose */ 91 app_destroy(); 92 } while (app_restart); 88 93 89 94 return 0; -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r2867 r2892 147 147 static void ring_stop(pjsua_call_id call_id); 148 148 149 pj_bool_t app_restart; 149 150 150 151 /***************************************************************************** … … 2824 2825 puts("| S Send arbitrary REQUEST | Cp Codec priorities | f Save config |"); 2825 2826 puts("+------------------------------+--------------------------+-------------------+"); 2826 puts("| q QUIT sleep MS echo [0|1|txt] n: detect NAT type|");2827 puts("| q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type |"); 2827 2828 puts("+=============================================================================+"); 2828 2829 … … 4104 4105 4105 4106 4107 case 'L': /* Restart */ 4108 app_restart = PJ_TRUE; 4109 /* Continues below */ 4110 4106 4111 case 'q': 4107 4112 goto on_exit; 4108 4109 4113 4110 4114 case 'R': … … 4238 4242 unsigned i; 4239 4243 pj_status_t status; 4244 4245 app_restart = PJ_FALSE; 4240 4246 4241 4247 /* Create pjsua */
Note: See TracChangeset
for help on using the changeset viewer.