Changeset 5170 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
- Timestamp:
- Aug 25, 2015 8:45:46 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
r4826 r5170 1749 1749 } 1750 1750 } else if (result.uri_result) { 1751 pj_str_t tmp ;1752 tmp = pj_str(result.uri_result);1753 pjsua_call_xfer( current_call, &tmp , &msg_data);1751 pj_str_t tmp2; 1752 tmp2 = pj_str(result.uri_result); 1753 pjsua_call_xfer( current_call, &tmp2, &msg_data); 1754 1754 } 1755 1755 } … … 1769 1769 pj_str_t STR_FALSE = { "false", 5 }; 1770 1770 pjsua_call_id ids[PJSUA_MAX_CALLS]; 1771 pjsua_msg_data msg_data ;1771 pjsua_msg_data msg_data_; 1772 1772 char buf[8] = {0}; 1773 1773 pj_str_t tmp = pj_str(buf); … … 1823 1823 } 1824 1824 1825 pjsua_msg_data_init(&msg_data );1825 pjsua_msg_data_init(&msg_data_); 1826 1826 if (app_config.no_refersub) { 1827 1827 /* Add Refer-Sub: false in outgoing REFER request */ 1828 1828 pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB, 1829 1829 &STR_FALSE); 1830 pj_list_push_back(&msg_data .hdr_list, &refer_sub);1830 pj_list_push_back(&msg_data_.hdr_list, &refer_sub); 1831 1831 } 1832 1832 1833 1833 pjsua_call_xfer_replaces(call, dst_call, 1834 1834 PJSUA_XFER_NO_REQUIRE_REPLACES, 1835 &msg_data );1835 &msg_data_); 1836 1836 } 1837 1837 return PJ_SUCCESS; … … 2662 2662 } 2663 2663 2664 static pj_status_t add_call_command(pj_cli_t *c li)2664 static pj_status_t add_call_command(pj_cli_t *c) 2665 2665 { 2666 2666 char* call_command = … … 2734 2734 2735 2735 pj_str_t xml = pj_str(call_command); 2736 return pj_cli_add_cmd_from_xml(c li, NULL,2736 return pj_cli_add_cmd_from_xml(c, NULL, 2737 2737 &xml, cmd_call_handler, 2738 2738 NULL, get_choice_value); 2739 2739 } 2740 2740 2741 static pj_status_t add_presence_command(pj_cli_t *c li)2741 static pj_status_t add_presence_command(pj_cli_t *c) 2742 2742 { 2743 2743 char* presence_command = … … 2790 2790 pj_str_t xml = pj_str(presence_command); 2791 2791 2792 return pj_cli_add_cmd_from_xml(c li, NULL,2792 return pj_cli_add_cmd_from_xml(c, NULL, 2793 2793 &xml, cmd_presence_handler, 2794 2794 NULL, get_choice_value); 2795 2795 } 2796 2796 2797 static pj_status_t add_account_command(pj_cli_t *c li)2797 static pj_status_t add_account_command(pj_cli_t *c) 2798 2798 { 2799 2799 char* account_command = … … 2835 2835 2836 2836 pj_str_t xml = pj_str(account_command); 2837 return pj_cli_add_cmd_from_xml(c li, NULL,2837 return pj_cli_add_cmd_from_xml(c, NULL, 2838 2838 &xml, cmd_account_handler, 2839 2839 NULL, get_choice_value); 2840 2840 } 2841 2841 2842 static pj_status_t add_media_command(pj_cli_t *c li)2842 static pj_status_t add_media_command(pj_cli_t *c) 2843 2843 { 2844 2844 char* media_command = … … 2870 2870 2871 2871 pj_str_t xml = pj_str(media_command); 2872 return pj_cli_add_cmd_from_xml(c li, NULL,2872 return pj_cli_add_cmd_from_xml(c, NULL, 2873 2873 &xml, cmd_media_handler, 2874 2874 NULL, get_choice_value); 2875 2875 } 2876 2876 2877 static pj_status_t add_config_command(pj_cli_t *c li)2877 static pj_status_t add_config_command(pj_cli_t *c) 2878 2878 { 2879 2879 char* config_command = … … 2891 2891 2892 2892 pj_str_t xml = pj_str(config_command); 2893 return pj_cli_add_cmd_from_xml(c li, NULL,2893 return pj_cli_add_cmd_from_xml(c, NULL, 2894 2894 &xml, cmd_config_handler, 2895 2895 NULL, get_choice_value); … … 3042 3042 #endif 3043 3043 3044 static pj_status_t add_other_command(pj_cli_t *c li)3044 static pj_status_t add_other_command(pj_cli_t *c) 3045 3045 { 3046 3046 char* sleep_command = … … 3069 3069 pj_str_t restart_xml = pj_str(restart_command); 3070 3070 3071 status = pj_cli_add_cmd_from_xml(c li, NULL,3071 status = pj_cli_add_cmd_from_xml(c, NULL, 3072 3072 &sleep_xml, cmd_sleep_handler, 3073 3073 NULL, NULL); … … 3075 3075 return status; 3076 3076 3077 status = pj_cli_add_cmd_from_xml(c li, NULL,3077 status = pj_cli_add_cmd_from_xml(c, NULL, 3078 3078 &network_xml, cmd_network_handler, 3079 3079 NULL, NULL); … … 3081 3081 return status; 3082 3082 3083 status = pj_cli_add_cmd_from_xml(c li, NULL,3083 status = pj_cli_add_cmd_from_xml(c, NULL, 3084 3084 &shutdown_xml, cmd_quit_handler, 3085 3085 NULL, NULL); … … 3088 3088 return status; 3089 3089 3090 status = pj_cli_add_cmd_from_xml(c li, NULL,3090 status = pj_cli_add_cmd_from_xml(c, NULL, 3091 3091 &restart_xml, cmd_restart_handler, 3092 3092 NULL, NULL); … … 3095 3095 } 3096 3096 3097 pj_status_t cli_setup_command(pj_cli_t *c li)3097 pj_status_t cli_setup_command(pj_cli_t *c) 3098 3098 { 3099 3099 pj_status_t status; 3100 3100 3101 status = add_call_command(c li);3101 status = add_call_command(c); 3102 3102 if (status != PJ_SUCCESS) 3103 3103 return status; 3104 3104 3105 status = add_presence_command(c li);3105 status = add_presence_command(c); 3106 3106 if (status != PJ_SUCCESS) 3107 3107 return status; 3108 3108 3109 status = add_account_command(c li);3109 status = add_account_command(c); 3110 3110 if (status != PJ_SUCCESS) 3111 3111 return status; 3112 3112 3113 status = add_media_command(c li);3113 status = add_media_command(c); 3114 3114 if (status != PJ_SUCCESS) 3115 3115 return status; 3116 3116 3117 status = add_config_command(c li);3117 status = add_config_command(c); 3118 3118 if (status != PJ_SUCCESS) 3119 3119 return status; 3120 3120 3121 3121 #if PJSUA_HAS_VIDEO 3122 status = add_video_command(c li);3122 status = add_video_command(c); 3123 3123 if (status != PJ_SUCCESS) 3124 3124 return status; 3125 3125 #endif 3126 3126 3127 status = add_other_command(c li);3127 status = add_other_command(c); 3128 3128 3129 3129 return status;
Note: See TracChangeset
for help on using the changeset viewer.