Changeset 5649 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
- Timestamp:
- Sep 15, 2017 5:32:08 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
r5626 r5649 39 39 #define CMD_QUIT 110 40 40 #define CMD_RESTART 120 41 #define CMD_HANDLE_IP_CHANGE 130 41 42 42 43 /* call level 2 command */ … … 2584 2585 /* Invoke CLI stop callback (defined in pjsua_app.c) */ 2585 2586 cli_on_stopped(PJ_FALSE, 0, NULL); 2587 2588 return PJ_SUCCESS; 2589 } 2590 2591 static pj_status_t cmd_ip_change_handler(pj_cli_cmd_val *cval) 2592 { 2593 pj_status_t status = PJ_SUCCESS; 2594 pjsua_ip_change_param param; 2595 PJ_UNUSED_ARG(cval); 2596 2597 pjsua_ip_change_param_default(¶m); 2598 pjsua_handle_ip_change(¶m); 2586 2599 2587 2600 return PJ_SUCCESS; … … 3069 3082 "</CMD>"; 3070 3083 3084 char* ip_change_command = 3085 "<CMD name='ip_change' id='130' desc='Handle IP change'/>"; 3086 3071 3087 pj_status_t status; 3072 3088 pj_str_t sleep_xml = pj_str(sleep_command); … … 3074 3090 pj_str_t shutdown_xml = pj_str(shutdown_command); 3075 3091 pj_str_t restart_xml = pj_str(restart_command); 3092 pj_str_t ip_change_xml = pj_str(ip_change_command); 3076 3093 3077 3094 status = pj_cli_add_cmd_from_xml(c, NULL, … … 3098 3115 NULL, NULL); 3099 3116 3117 if (status != PJ_SUCCESS) 3118 return status; 3119 3120 status = pj_cli_add_cmd_from_xml(c, NULL, 3121 &ip_change_xml, cmd_ip_change_handler, 3122 NULL, NULL); 3123 3100 3124 return status; 3101 3125 }
Note: See TracChangeset
for help on using the changeset viewer.