diff options
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 42 | ||||
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app_cli.c | 60 | ||||
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app_legacy.c | 42 | ||||
-rw-r--r-- | pjsip-apps/src/samples/clidemo.c | 5 | ||||
-rw-r--r-- | pjsip-apps/src/samples/httpdemo.c | 8 | ||||
-rw-r--r-- | pjsip-apps/src/samples/mix.c | 6 | ||||
-rw-r--r-- | pjsip-apps/src/samples/pcaputil.c | 2 | ||||
-rw-r--r-- | pjsip-apps/src/samples/pjsip-perf.c | 8 | ||||
-rw-r--r-- | pjsip-apps/src/samples/siprtp.c | 3 | ||||
-rw-r--r-- | pjsip-apps/src/samples/stateful_proxy.c | 12 |
10 files changed, 91 insertions, 97 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 912d986f..af34ac91 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -138,7 +138,7 @@ static void call_timeout_callback(pj_timer_heap_t *timer_heap, struct pj_timer_entry *entry) { pjsua_call_id call_id = entry->id; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; pjsip_generic_string_hdr warn; pj_str_t hname = pj_str("Warning"); pj_str_t hvalue = pj_str("399 pjsua \"Call duration exceeded\""); @@ -151,16 +151,16 @@ static void call_timeout_callback(pj_timer_heap_t *timer_heap, } /* Add warning header */ - pjsua_msg_data_init(&msg_data); + pjsua_msg_data_init(&msg_data_); pjsip_generic_string_hdr_init2(&warn, &hname, &hvalue); - pj_list_push_back(&msg_data.hdr_list, &warn); + pj_list_push_back(&msg_data_.hdr_list, &warn); /* Call duration has been exceeded; disconnect the call */ PJ_LOG(3,(THIS_FILE, "Duration (%d seconds) has been exceeded " "for call %d, disconnecting the call", app_config.duration, call_id)); entry->id = PJSUA_INVALID_ID; - pjsua_call_hangup(call_id, 200, NULL, &msg_data); + pjsua_call_hangup(call_id, 200, NULL, &msg_data_); } /* @@ -293,13 +293,13 @@ static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, ring_start(call_id); if (app_config.auto_answer > 0) { - pjsua_call_setting call_opt; + pjsua_call_setting opt; - pjsua_call_setting_default(&call_opt); - call_opt.aud_cnt = app_config.aud_cnt; - call_opt.vid_cnt = app_config.vid.vid_cnt; + pjsua_call_setting_default(&opt); + opt.aud_cnt = app_config.aud_cnt; + opt.vid_cnt = app_config.vid.vid_cnt; - pjsua_call_answer2(call_id, &call_opt, app_config.auto_answer, NULL, + pjsua_call_answer2(call_id, &opt, app_config.auto_answer, NULL, NULL); } @@ -667,7 +667,7 @@ static void on_incoming_subscribe(pjsua_acc_id acc_id, pjsip_rx_data *rdata, pjsip_status_code *code, pj_str_t *reason, - pjsua_msg_data *msg_data) + pjsua_msg_data *msg_data_) { /* Just accept the request (the default behavior) */ PJ_UNUSED_ARG(acc_id); @@ -677,7 +677,7 @@ static void on_incoming_subscribe(pjsua_acc_id acc_id, PJ_UNUSED_ARG(rdata); PJ_UNUSED_ARG(code); PJ_UNUSED_ARG(reason); - PJ_UNUSED_ARG(msg_data); + PJ_UNUSED_ARG(msg_data_); } @@ -1412,26 +1412,26 @@ static pj_status_t app_init() pjmedia_port *tport; char name[80]; pj_str_t label; - pj_status_t status; + pj_status_t status2; pj_ansi_snprintf(name, sizeof(name), "tone-%d,%d", app_config.tones[i].freq1, app_config.tones[i].freq2); label = pj_str(name); - status = pjmedia_tonegen_create2(app_config.pool, &label, - 8000, 1, 160, 16, - PJMEDIA_TONEGEN_LOOP, &tport); - if (status != PJ_SUCCESS) { + status2 = pjmedia_tonegen_create2(app_config.pool, &label, + 8000, 1, 160, 16, + PJMEDIA_TONEGEN_LOOP, &tport); + if (status2 != PJ_SUCCESS) { pjsua_perror(THIS_FILE, "Unable to create tone generator", status); goto on_error; } - status = pjsua_conf_add_port(app_config.pool, tport, + status2 = pjsua_conf_add_port(app_config.pool, tport, &app_config.tone_slots[i]); - pj_assert(status == PJ_SUCCESS); + pj_assert(status2 == PJ_SUCCESS); - status = pjmedia_tonegen_play(tport, 1, &app_config.tones[i], 0); - pj_assert(status == PJ_SUCCESS); + status2 = pjmedia_tonegen_play(tport, 1, &app_config.tones[i], 0); + pj_assert(status2 == PJ_SUCCESS); } /* Optionally create recorder file, if any. */ @@ -1448,7 +1448,7 @@ static pj_status_t app_init() /* Create ringback tones */ if (app_config.no_tones == PJ_FALSE) { - unsigned i, samples_per_frame; + unsigned samples_per_frame; pjmedia_tone_desc tone[RING_CNT+RINGBACK_CNT]; pj_str_t name; diff --git a/pjsip-apps/src/pjsua/pjsua_app_cli.c b/pjsip-apps/src/pjsua/pjsua_app_cli.c index 0ba15979..4d6b1d41 100644 --- a/pjsip-apps/src/pjsua/pjsua_app_cli.c +++ b/pjsip-apps/src/pjsua/pjsua_app_cli.c @@ -1748,9 +1748,9 @@ static pj_status_t cmd_transfer_call(pj_cli_cmd_val *cval) pjsua_call_xfer( current_call, &binfo.uri, &msg_data); } } else if (result.uri_result) { - pj_str_t tmp; - tmp = pj_str(result.uri_result); - pjsua_call_xfer( current_call, &tmp, &msg_data); + pj_str_t tmp2; + tmp2 = pj_str(result.uri_result); + pjsua_call_xfer( current_call, &tmp2, &msg_data); } } return PJ_SUCCESS; @@ -1768,7 +1768,7 @@ static pj_status_t cmd_transfer_replace_call(pj_cli_cmd_val *cval) pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 }; pj_str_t STR_FALSE = { "false", 5 }; pjsua_call_id ids[PJSUA_MAX_CALLS]; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; char buf[8] = {0}; pj_str_t tmp = pj_str(buf); unsigned count; @@ -1822,17 +1822,17 @@ static pj_status_t cmd_transfer_replace_call(pj_cli_cmd_val *cval) return PJ_SUCCESS; } - pjsua_msg_data_init(&msg_data); + pjsua_msg_data_init(&msg_data_); if (app_config.no_refersub) { /* Add Refer-Sub: false in outgoing REFER request */ pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB, &STR_FALSE); - pj_list_push_back(&msg_data.hdr_list, &refer_sub); + pj_list_push_back(&msg_data_.hdr_list, &refer_sub); } pjsua_call_xfer_replaces(call, dst_call, PJSUA_XFER_NO_REQUIRE_REPLACES, - &msg_data); + &msg_data_); } return PJ_SUCCESS; } @@ -2661,7 +2661,7 @@ static pj_status_t cmd_restart_handler(pj_cli_cmd_val *cval) return PJ_SUCCESS; } -static pj_status_t add_call_command(pj_cli_t *cli) +static pj_status_t add_call_command(pj_cli_t *c) { char* call_command = "<CMD name='call' id='100' desc='Call related commands'>" @@ -2733,12 +2733,12 @@ static pj_status_t add_call_command(pj_cli_t *cli) "</CMD>"; pj_str_t xml = pj_str(call_command); - return pj_cli_add_cmd_from_xml(cli, NULL, + return pj_cli_add_cmd_from_xml(c, NULL, &xml, cmd_call_handler, NULL, get_choice_value); } -static pj_status_t add_presence_command(pj_cli_t *cli) +static pj_status_t add_presence_command(pj_cli_t *c) { char* presence_command = "<CMD name='im' id='200' desc='IM and Presence Commands'>" @@ -2789,12 +2789,12 @@ static pj_status_t add_presence_command(pj_cli_t *cli) pj_str_t xml = pj_str(presence_command); - return pj_cli_add_cmd_from_xml(cli, NULL, + return pj_cli_add_cmd_from_xml(c, NULL, &xml, cmd_presence_handler, NULL, get_choice_value); } -static pj_status_t add_account_command(pj_cli_t *cli) +static pj_status_t add_account_command(pj_cli_t *c) { char* account_command = "<CMD name='acc' id='300' desc='Account commands'>" @@ -2834,12 +2834,12 @@ static pj_status_t add_account_command(pj_cli_t *cli) "</CMD>"; pj_str_t xml = pj_str(account_command); - return pj_cli_add_cmd_from_xml(cli, NULL, + return pj_cli_add_cmd_from_xml(c, NULL, &xml, cmd_account_handler, NULL, get_choice_value); } -static pj_status_t add_media_command(pj_cli_t *cli) +static pj_status_t add_media_command(pj_cli_t *c) { char* media_command = "<CMD name='audio' id='400' desc='Conference and Media commands'>" @@ -2869,12 +2869,12 @@ static pj_status_t add_media_command(pj_cli_t *cli) "</CMD>"; pj_str_t xml = pj_str(media_command); - return pj_cli_add_cmd_from_xml(cli, NULL, + return pj_cli_add_cmd_from_xml(c, NULL, &xml, cmd_media_handler, NULL, get_choice_value); } -static pj_status_t add_config_command(pj_cli_t *cli) +static pj_status_t add_config_command(pj_cli_t *c) { char* config_command = "<CMD name='stat' id='500' desc='Status and config commands'>" @@ -2890,7 +2890,7 @@ static pj_status_t add_config_command(pj_cli_t *cli) "</CMD>"; pj_str_t xml = pj_str(config_command); - return pj_cli_add_cmd_from_xml(cli, NULL, + return pj_cli_add_cmd_from_xml(c, NULL, &xml, cmd_config_handler, NULL, get_choice_value); } @@ -3041,7 +3041,7 @@ static pj_status_t add_video_command(pj_cli_t *cli) } #endif -static pj_status_t add_other_command(pj_cli_t *cli) +static pj_status_t add_other_command(pj_cli_t *c) { char* sleep_command = "<CMD name='sleep' id='700' desc='Suspend keyboard input'>" @@ -3068,63 +3068,63 @@ static pj_status_t add_other_command(pj_cli_t *cli) pj_str_t shutdown_xml = pj_str(shutdown_command); pj_str_t restart_xml = pj_str(restart_command); - status = pj_cli_add_cmd_from_xml(cli, NULL, + status = pj_cli_add_cmd_from_xml(c, NULL, &sleep_xml, cmd_sleep_handler, NULL, NULL); if (status != PJ_SUCCESS) return status; - status = pj_cli_add_cmd_from_xml(cli, NULL, + status = pj_cli_add_cmd_from_xml(c, NULL, &network_xml, cmd_network_handler, NULL, NULL); if (status != PJ_SUCCESS) return status; - status = pj_cli_add_cmd_from_xml(cli, NULL, + status = pj_cli_add_cmd_from_xml(c, NULL, &shutdown_xml, cmd_quit_handler, NULL, NULL); if (status != PJ_SUCCESS) return status; - status = pj_cli_add_cmd_from_xml(cli, NULL, + status = pj_cli_add_cmd_from_xml(c, NULL, &restart_xml, cmd_restart_handler, NULL, NULL); return status; } -pj_status_t cli_setup_command(pj_cli_t *cli) +pj_status_t cli_setup_command(pj_cli_t *c) { pj_status_t status; - status = add_call_command(cli); + status = add_call_command(c); if (status != PJ_SUCCESS) return status; - status = add_presence_command(cli); + status = add_presence_command(c); if (status != PJ_SUCCESS) return status; - status = add_account_command(cli); + status = add_account_command(c); if (status != PJ_SUCCESS) return status; - status = add_media_command(cli); + status = add_media_command(c); if (status != PJ_SUCCESS) return status; - status = add_config_command(cli); + status = add_config_command(c); if (status != PJ_SUCCESS) return status; #if PJSUA_HAS_VIDEO - status = add_video_command(cli); + status = add_video_command(c); if (status != PJ_SUCCESS) return status; #endif - status = add_other_command(cli); + status = add_other_command(c); return status; } diff --git a/pjsip-apps/src/pjsua/pjsua_app_legacy.c b/pjsip-apps/src/pjsua/pjsua_app_legacy.c index d687aded..dab8bfb9 100644 --- a/pjsip-apps/src/pjsua/pjsua_app_legacy.c +++ b/pjsip-apps/src/pjsua/pjsua_app_legacy.c @@ -606,7 +606,7 @@ on_error: static void ui_make_new_call() { char buf[128]; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; input_result result; pj_str_t tmp; @@ -631,10 +631,10 @@ static void ui_make_new_call() tmp.slen = 0; } - pjsua_msg_data_init(&msg_data); - TEST_MULTIPART(&msg_data); + pjsua_msg_data_init(&msg_data_); + TEST_MULTIPART(&msg_data_); pjsua_call_make_call(current_acc, &tmp, &call_opt, NULL, - &msg_data, ¤t_call); + &msg_data_, ¤t_call); } static void ui_make_multi_call() @@ -757,7 +757,7 @@ static void ui_answer_call() { pjsua_call_info call_info; char buf[128]; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; if (current_call != -1) { pjsua_call_get_info(current_call, &call_info); @@ -789,7 +789,7 @@ static void ui_answer_call() if (st_code < 100) return; - pjsua_msg_data_init(&msg_data); + pjsua_msg_data_init(&msg_data_); if (st_code/100 == 3) { if (!simple_input("Enter URL to be put in Contact", @@ -798,7 +798,7 @@ static void ui_answer_call() hvalue = pj_str(contact); pjsip_generic_string_hdr_init2(&hcontact, &hname, &hvalue); - pj_list_push_back(&msg_data.hdr_list, &hcontact); + pj_list_push_back(&msg_data_.hdr_list, &hcontact); } /* @@ -812,7 +812,7 @@ static void ui_answer_call() return; } - pjsua_call_answer2(current_call, &call_opt, st_code, NULL, &msg_data); + pjsua_call_answer2(current_call, &call_opt, st_code, NULL, &msg_data_); } } @@ -1079,7 +1079,7 @@ static void ui_call_transfer(pj_bool_t no_refersub) pj_str_t STR_FALSE = { "false", 5 }; pjsua_call_info ci; input_result result; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; pjsua_call_get_info(current_call, &ci); printf("Transferring current call [%d] %.*s\n", current_call, @@ -1094,12 +1094,12 @@ static void ui_call_transfer(pj_bool_t no_refersub) return; } - pjsua_msg_data_init(&msg_data); + pjsua_msg_data_init(&msg_data_); if (no_refersub) { /* Add Refer-Sub: false in outgoing REFER request */ pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB, &STR_FALSE); - pj_list_push_back(&msg_data.hdr_list, &refer_sub); + pj_list_push_back(&msg_data_.hdr_list, &refer_sub); } if (result.nb_result != PJSUA_APP_NO_NB) { if (result.nb_result == -1 || result.nb_result == 0) { @@ -1107,13 +1107,13 @@ static void ui_call_transfer(pj_bool_t no_refersub) } else { pjsua_buddy_info binfo; pjsua_buddy_get_info(result.nb_result-1, &binfo); - pjsua_call_xfer( current_call, &binfo.uri, &msg_data); + pjsua_call_xfer( current_call, &binfo.uri, &msg_data_); } } else if (result.uri_result) { pj_str_t tmp; tmp = pj_str(result.uri_result); - pjsua_call_xfer( current_call, &tmp, &msg_data); + pjsua_call_xfer( current_call, &tmp, &msg_data_); } } } @@ -1130,7 +1130,7 @@ static void ui_call_transfer_replaces(pj_bool_t no_refersub) pj_str_t STR_FALSE = { "false", 5 }; pjsua_call_id ids[PJSUA_MAX_CALLS]; pjsua_call_info ci; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; char buf[128]; unsigned i, count; @@ -1189,17 +1189,17 @@ static void ui_call_transfer_replaces(pj_bool_t no_refersub) return; } - pjsua_msg_data_init(&msg_data); + pjsua_msg_data_init(&msg_data_); if (no_refersub) { /* Add Refer-Sub: false in outgoing REFER request */ pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB, &STR_FALSE); - pj_list_push_back(&msg_data.hdr_list, &refer_sub); + pj_list_push_back(&msg_data_.hdr_list, &refer_sub); } pjsua_call_xfer_replaces(call, dst_call, PJSUA_XFER_NO_REQUIRE_REPLACES, - &msg_data); + &msg_data_); } } @@ -1262,19 +1262,19 @@ static void ui_send_dtmf_info() digits = pj_str(buf); for (i=0; i<digits.slen; ++i) { char body[80]; - pjsua_msg_data msg_data; + pjsua_msg_data msg_data_; pjsua_msg_data_init(&msg_data); - msg_data.content_type = pj_str("application/dtmf-relay"); + msg_data_.content_type = pj_str("application/dtmf-relay"); pj_ansi_snprintf(body, sizeof(body), "Signal=%c\r\n" "Duration=160", buf[i]); - msg_data.msg_body = pj_str(body); + msg_data_.msg_body = pj_str(body); status = pjsua_call_send_request(current_call, &SIP_INFO, - &msg_data); + &msg_data_); if (status != PJ_SUCCESS) { return; } diff --git a/pjsip-apps/src/samples/clidemo.c b/pjsip-apps/src/samples/clidemo.c index 7de31c90..da9a9339 100644 --- a/pjsip-apps/src/samples/clidemo.c +++ b/pjsip-apps/src/samples/clidemo.c @@ -219,7 +219,7 @@ on_return: /* * Simple implementation of app_main() for console targets */ -pj_status_t app_main(pj_cli_t *cli) +pj_status_t app_main(pj_cli_t *c) { pj_status_t status; pj_cli_sess *sess; @@ -231,7 +231,7 @@ pj_status_t app_main(pj_cli_t *cli) /* * Create the console front end */ - status = pj_cli_console_create(cli, &console_cfg, &sess, NULL); + status = pj_cli_console_create(c, &console_cfg, &sess, NULL); if (status != PJ_SUCCESS) return status; @@ -242,7 +242,6 @@ pj_status_t app_main(pj_cli_t *cli) */ for (;;) { char cmdline[PJ_CLI_MAX_CMDBUF]; - pj_status_t status; status = pj_cli_console_process(sess, &cmdline[0], sizeof(cmdline)); if (status != PJ_SUCCESS) diff --git a/pjsip-apps/src/samples/httpdemo.c b/pjsip-apps/src/samples/httpdemo.c index a1190111..ec49a0f9 100644 --- a/pjsip-apps/src/samples/httpdemo.c +++ b/pjsip-apps/src/samples/httpdemo.c @@ -43,11 +43,11 @@ static FILE *f = NULL; //#define VERBOSE #define THIS_FILE "http_demo" -static void on_response(pj_http_req *http_req, const pj_http_resp *resp) +static void on_response(pj_http_req *req, const pj_http_resp *resp) { unsigned i; - PJ_UNUSED_ARG(http_req); + PJ_UNUSED_ARG(req); PJ_LOG(3,(THIS_FILE, "%.*s %d %.*s", (int)resp->version.slen, resp->version.ptr, resp->status_code, (int)resp->reason.slen, resp->reason.ptr)); @@ -65,9 +65,9 @@ static void on_response(pj_http_req *http_req, const pj_http_resp *resp) } } -static void on_send_data(pj_http_req *http_req, void **data, pj_size_t *size) +static void on_send_data(pj_http_req *req, void **data, pj_size_t *size) { - PJ_UNUSED_ARG(http_req); + PJ_UNUSED_ARG(req); PJ_UNUSED_ARG(size); PJ_UNUSED_ARG(data); } diff --git a/pjsip-apps/src/samples/mix.c b/pjsip-apps/src/samples/mix.c index cc139f76..da2dd6d8 100644 --- a/pjsip-apps/src/samples/mix.c +++ b/pjsip-apps/src/samples/mix.c @@ -195,14 +195,14 @@ int main(int argc, char *argv[]) processed = 0; while (processed < longest + clock_rate * APPEND * 2 / 1000) { pj_int16_t framebuf[PTIME * 48000 / 1000]; - pjmedia_port *cp = pjmedia_conf_get_master_port(conf); + pjmedia_port *mp = pjmedia_conf_get_master_port(conf); pjmedia_frame frame; frame.buf = framebuf; - frame.size = PJMEDIA_PIA_SPF(&cp->info) * 2; + frame.size = PJMEDIA_PIA_SPF(&mp->info) * 2; pj_assert(frame.size <= sizeof(framebuf)); - CHECK( pjmedia_port_get_frame(cp, &frame) ); + CHECK( pjmedia_port_get_frame(mp, &frame) ); if (frame.type != PJMEDIA_FRAME_TYPE_AUDIO) { pj_bzero(frame.buf, frame.size); diff --git a/pjsip-apps/src/samples/pcaputil.c b/pjsip-apps/src/samples/pcaputil.c index 86a58010..ad1022f7 100644 --- a/pjsip-apps/src/samples/pcaputil.c +++ b/pjsip-apps/src/samples/pcaputil.c @@ -371,8 +371,6 @@ static void pcap2wav(const pj_str_t *codec, /* Decode and write to WAV file */ samples_cnt = 0; for (i=0; i<frame_cnt; ++i) { - pjmedia_frame pcm_frame; - pcm_frame.buf = pcm; pcm_frame.size = samples_per_frame * 2; diff --git a/pjsip-apps/src/samples/pjsip-perf.c b/pjsip-apps/src/samples/pjsip-perf.c index 974e9337..10bde943 100644 --- a/pjsip-apps/src/samples/pjsip-perf.c +++ b/pjsip-apps/src/samples/pjsip-perf.c @@ -967,12 +967,12 @@ static void call_on_media_update( pjsip_inv_session *inv, { if (status != PJ_SUCCESS) { pjsip_tx_data *tdata; - pj_status_t status; + pj_status_t status2; - status = pjsip_inv_end_session(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE, + status2 = pjsip_inv_end_session(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE, NULL, &tdata); - if (status == PJ_SUCCESS && tdata) - status = pjsip_inv_send_msg(inv, tdata); + if (status2 == PJ_SUCCESS && tdata) + status2 = pjsip_inv_send_msg(inv, tdata); } } diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c index 1bee1f5c..262e2033 100644 --- a/pjsip-apps/src/samples/siprtp.c +++ b/pjsip-apps/src/samples/siprtp.c @@ -1059,7 +1059,6 @@ static pj_status_t create_sdp( pj_pool_t *pool, { pjmedia_sdp_rtpmap rtpmap; - pjmedia_sdp_attr *attr; char ptstr[10]; sprintf(ptstr, "%d", app.audio_codec.pt); @@ -2125,8 +2124,6 @@ int main(int argc, char *argv[]) /* If URL is specified, then make call immediately */ if (app.uri_to_call.slen) { - unsigned i; - PJ_LOG(3,(THIS_FILE, "Making %d calls to %s..", app.max_calls, app.uri_to_call.ptr)); diff --git a/pjsip-apps/src/samples/stateful_proxy.c b/pjsip-apps/src/samples/stateful_proxy.c index 3e870369..600ca942 100644 --- a/pjsip-apps/src/samples/stateful_proxy.c +++ b/pjsip-apps/src/samples/stateful_proxy.c @@ -247,7 +247,7 @@ static pj_bool_t proxy_on_rx_request( pjsip_rx_data *rdata ) } else { /* This is CANCEL request */ pjsip_transaction *invite_uas; - struct uas_data *uas_data; + struct uas_data *uas_data2; pj_str_t key; /* Find the UAS INVITE transaction */ @@ -269,17 +269,17 @@ static pj_bool_t proxy_on_rx_request( pjsip_rx_data *rdata ) * The UAS INVITE transaction will get final response when * we receive final response from the UAC INVITE transaction. */ - uas_data = (struct uas_data*) invite_uas->mod_data[mod_tu.id]; - if (uas_data->uac_tsx && uas_data->uac_tsx->status_code < 200) { + uas_data2 = (struct uas_data*) invite_uas->mod_data[mod_tu.id]; + if (uas_data2->uac_tsx && uas_data2->uac_tsx->status_code < 200) { pjsip_tx_data *cancel; - pj_grp_lock_acquire(uas_data->uac_tsx->grp_lock); + pj_grp_lock_acquire(uas_data2->uac_tsx->grp_lock); - pjsip_endpt_create_cancel(global.endpt, uas_data->uac_tsx->last_tx, + pjsip_endpt_create_cancel(global.endpt, uas_data2->uac_tsx->last_tx, &cancel); pjsip_endpt_send_request(global.endpt, cancel, -1, NULL, NULL); - pj_grp_lock_release(uas_data->uac_tsx->grp_lock); + pj_grp_lock_release(uas_data2->uac_tsx->grp_lock); } /* Unlock UAS tsx because it is locked in find_tsx() */ |