diff options
author | Russell Bryant <russell@russellbryant.com> | 2011-05-03 20:45:32 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2011-05-03 20:45:32 +0000 |
commit | 37aa52fd78996b5c516ff4c851b60252eda84b05 (patch) | |
tree | e1651180838e594a0203f863f3cdd084860e1bf5 /main | |
parent | 810b9c887949fc4bd9f01dcdc0d3a4f476cb00de (diff) |
Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
Fix a bunch of compiler warnings generated by gcc 4.6.0.
Most of these are -Wunused-but-set-variable, but there were a few others
mixed in here, as well.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk.c | 9 | ||||
-rw-r--r-- | main/audiohook.c | 18 | ||||
-rw-r--r-- | main/cdr.c | 11 | ||||
-rw-r--r-- | main/channel.c | 3 | ||||
-rw-r--r-- | main/config.c | 3 | ||||
-rw-r--r-- | main/dsp.c | 2 | ||||
-rw-r--r-- | main/features.c | 11 | ||||
-rw-r--r-- | main/file.c | 4 | ||||
-rw-r--r-- | main/fskmodem_float.c | 5 | ||||
-rw-r--r-- | main/manager.c | 2 | ||||
-rw-r--r-- | main/pbx.c | 7 | ||||
-rw-r--r-- | main/plc.c | 2 | ||||
-rw-r--r-- | main/rtp_engine.c | 18 | ||||
-rw-r--r-- | main/udptl.c | 2 |
14 files changed, 25 insertions, 72 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 0cf80b0d6..01db3a036 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -365,11 +365,10 @@ const char *ast_file_version_find(const char *file) struct file_version *iterator; AST_RWLIST_WRLOCK(&file_versions); - AST_RWLIST_TRAVERSE_SAFE_BEGIN(&file_versions, iterator, list) { + AST_RWLIST_TRAVERSE(&file_versions, iterator, list) { if (!strcasecmp(iterator->file, file)) break; - } - AST_RWLIST_TRAVERSE_SAFE_END; + } AST_RWLIST_UNLOCK(&file_versions); if (iterator) return iterator->version; @@ -580,9 +579,9 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl { uint64_t physmem, freeram; uint64_t freeswap = 0; - int totalswap = 0; int nprocs = 0; long uptime = 0; + int totalswap = 0; #if defined(HAVE_SYSINFO) struct sysinfo sys_info; sysinfo(&sys_info); @@ -665,7 +664,7 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl #if defined(HAVE_SYSINFO) ast_cli(a->fd, " Buffer RAM: %" PRIu64 " KiB\n", ((uint64_t) sys_info.bufferram * sys_info.mem_unit) / 1024); #endif -#if defined (HAVE_SYSCTL) && defined(HAVE_SWAPCTL) +#if defined (HAVE_SYSCTL) || defined(HAVE_SWAPCTL) ast_cli(a->fd, " Total Swap Space: %u KiB\n", totalswap); ast_cli(a->fd, " Free Swap Space: %" PRIu64 " KiB\n\n", freeswap); #endif diff --git a/main/audiohook.c b/main/audiohook.c index a1d658ce7..83fec318f 100644 --- a/main/audiohook.c +++ b/main/audiohook.c @@ -944,28 +944,25 @@ int ast_channel_audiohook_count_by_source(struct ast_channel *chan, const char * switch (type) { case AST_AUDIOHOOK_TYPE_SPY: - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->audiohooks->spy_list, ah, list) { + AST_LIST_TRAVERSE(&chan->audiohooks->spy_list, ah, list) { if (!strcmp(ah->source, source)) { count++; } } - AST_LIST_TRAVERSE_SAFE_END; break; case AST_AUDIOHOOK_TYPE_WHISPER: - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->audiohooks->whisper_list, ah, list) { + AST_LIST_TRAVERSE(&chan->audiohooks->whisper_list, ah, list) { if (!strcmp(ah->source, source)) { count++; } } - AST_LIST_TRAVERSE_SAFE_END; break; case AST_AUDIOHOOK_TYPE_MANIPULATE: - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->audiohooks->manipulate_list, ah, list) { + AST_LIST_TRAVERSE(&chan->audiohooks->manipulate_list, ah, list) { if (!strcmp(ah->source, source)) { count++; } } - AST_LIST_TRAVERSE_SAFE_END; break; default: ast_debug(1, "Invalid audiohook type supplied, (%d)\n", type); @@ -985,25 +982,22 @@ int ast_channel_audiohook_count_by_source_running(struct ast_channel *chan, cons switch (type) { case AST_AUDIOHOOK_TYPE_SPY: - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->audiohooks->spy_list, ah, list) { + AST_LIST_TRAVERSE(&chan->audiohooks->spy_list, ah, list) { if ((!strcmp(ah->source, source)) && (ah->status == AST_AUDIOHOOK_STATUS_RUNNING)) count++; } - AST_LIST_TRAVERSE_SAFE_END; break; case AST_AUDIOHOOK_TYPE_WHISPER: - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->audiohooks->whisper_list, ah, list) { + AST_LIST_TRAVERSE(&chan->audiohooks->whisper_list, ah, list) { if ((!strcmp(ah->source, source)) && (ah->status == AST_AUDIOHOOK_STATUS_RUNNING)) count++; } - AST_LIST_TRAVERSE_SAFE_END; break; case AST_AUDIOHOOK_TYPE_MANIPULATE: - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->audiohooks->manipulate_list, ah, list) { + AST_LIST_TRAVERSE(&chan->audiohooks->manipulate_list, ah, list) { if ((!strcmp(ah->source, source)) && (ah->status == AST_AUDIOHOOK_STATUS_RUNNING)) count++; } - AST_LIST_TRAVERSE_SAFE_END; break; default: ast_debug(1, "Invalid audiohook type supplied, (%d)\n", type); diff --git a/main/cdr.c b/main/cdr.c index 1677b1ba3..2579f8525 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -716,11 +716,8 @@ void ast_cdr_merge(struct ast_cdr *to, struct ast_cdr *from) void ast_cdr_start(struct ast_cdr *cdr) { - char *chan; - for (; cdr; cdr = cdr->next) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { - chan = S_OR(cdr->channel, "<unknown>"); check_post(cdr); cdr->start = ast_tvnow(); } @@ -768,11 +765,8 @@ void ast_cdr_failed(struct ast_cdr *cdr) void ast_cdr_noanswer(struct ast_cdr *cdr) { - char *chan; - while (cdr) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { - chan = !ast_strlen_zero(cdr->channel) ? cdr->channel : "<unknown>"; check_post(cdr); cdr->disposition = AST_CDR_NOANSWER; } @@ -892,11 +886,8 @@ static int cdr_seq_inc(struct ast_cdr *cdr) int ast_cdr_init(struct ast_cdr *cdr, struct ast_channel *c) { - char *chan; - for ( ; cdr ; cdr = cdr->next) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { - chan = S_OR(cdr->channel, "<unknown>"); ast_copy_string(cdr->channel, c->name, sizeof(cdr->channel)); set_one_cid(cdr, c); cdr_seq_inc(cdr); @@ -1116,7 +1107,6 @@ int ast_cdr_amaflags2int(const char *flag) static void post_cdr(struct ast_cdr *cdr) { - char *chan; struct ast_cdr_beitem *i; for ( ; cdr ; cdr = cdr->next) { @@ -1134,7 +1124,6 @@ static void post_cdr(struct ast_cdr *cdr) continue; } - chan = S_OR(cdr->channel, "<unknown>"); check_post(cdr); ast_set_flag(cdr, AST_CDR_FLAG_POSTED); if (ast_test_flag(cdr, AST_CDR_FLAG_POST_DISABLED)) diff --git a/main/channel.c b/main/channel.c index 55695c54c..2b90ef494 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2531,7 +2531,7 @@ struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const if (info == NULL) return NULL; - AST_LIST_TRAVERSE_SAFE_BEGIN(&chan->datastores, datastore, entry) { + AST_LIST_TRAVERSE(&chan->datastores, datastore, entry) { if (datastore->info != info) { continue; } @@ -2546,7 +2546,6 @@ struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const break; } } - AST_LIST_TRAVERSE_SAFE_END; return datastore; } diff --git a/main/config.c b/main/config.c index 2d8f9f34e..02b2bf628 100644 --- a/main/config.c +++ b/main/config.c @@ -1021,7 +1021,6 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, } else if (cur[0] == '#') { /* A directive - #include or #exec */ char *cur2; char real_inclusion_name[256]; - struct ast_config_include *inclu; int do_include = 0; /* otherwise, it is exec */ cur++; @@ -1094,7 +1093,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, } /* A #include */ /* record this inclusion */ - inclu = ast_include_new(cfg, cfg->include_level == 1 ? "" : configfile, cur, !do_include, cur2, lineno, real_inclusion_name, sizeof(real_inclusion_name)); + ast_include_new(cfg, cfg->include_level == 1 ? "" : configfile, cur, !do_include, cur2, lineno, real_inclusion_name, sizeof(real_inclusion_name)); do_include = ast_config_internal_load(cur, cfg, flags, real_inclusion_name, who_asked) ? 1 : 0; if (!ast_strlen_zero(exec_file)) diff --git a/main/dsp.c b/main/dsp.c index 5d5d1a2c2..3ea61fed0 100644 --- a/main/dsp.c +++ b/main/dsp.c @@ -787,7 +787,6 @@ static int mf_detect(struct ast_dsp *dsp, digit_detect_state_t *s, int16_t amp[] float energy[6]; int best; int second_best; - float famp; int i; int j; int sample; @@ -812,7 +811,6 @@ static int mf_detect(struct ast_dsp *dsp, digit_detect_state_t *s, int16_t amp[] /* The following unrolled loop takes only 35% (rough estimate) of the time of a rolled loop on the machine on which it was developed */ for (j = sample; j < limit; j++) { - famp = amp[j]; /* With GCC 2.95, the following unrolled code seems to take about 35% (rough estimate) as long as a neat little 0-3 loop */ goertzel_sample(s->td.mf.tone_out, amp[j]); diff --git a/main/features.c b/main/features.c index f77962347..c12a02c1c 100644 --- a/main/features.c +++ b/main/features.c @@ -918,7 +918,7 @@ struct ast_park_call_args { static struct parkeduser *park_space_reserve(struct ast_channel *chan, struct ast_channel *peer, struct ast_park_call_args *args) { struct parkeduser *pu; - int i, parking_space = -1, parking_range; + int i, parking_space = -1; const char *parkinglotname = NULL; const char *parkingexten; struct ast_parkinglot *parkinglot = NULL; @@ -1031,9 +1031,6 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan, struct as int start; struct parkeduser *cur = NULL; - /* Select parking space within range */ - parking_range = parkinglot->parking_stop - parkinglot->parking_start + 1; - if (ast_test_flag(args, AST_PARK_OPT_RANDOMIZE)) { start = ast_random() % (parkinglot->parking_stop - parkinglot->parking_start + 1); } else { @@ -1082,7 +1079,6 @@ static struct parkeduser *park_space_reserve(struct ast_channel *chan, struct as static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, struct ast_park_call_args *args) { struct ast_context *con; - int parkingnum_copy; struct parkeduser *pu = args->pu; const char *event_from; @@ -1111,7 +1107,6 @@ static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, st pu->start = ast_tvnow(); pu->parkingtime = (args->timeout > 0) ? args->timeout : pu->parkinglot->parkingtime; - parkingnum_copy = pu->parkingnum; if (args->extout) *(args->extout) = pu->parkingnum; @@ -3460,7 +3455,6 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast int we_disabled_peer_cdr = 0; struct ast_option_header *aoh; struct ast_cdr *bridge_cdr = NULL; - struct ast_cdr *orig_peer_cdr = NULL; struct ast_cdr *chan_cdr = chan->cdr; /* the proper chan cdr, if there are forked cdrs */ struct ast_cdr *peer_cdr = peer->cdr; /* the proper chan cdr, if there are forked cdrs */ struct ast_cdr *new_chan_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */ @@ -3532,8 +3526,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast } ast_copy_string(orig_channame,chan->name,sizeof(orig_channame)); ast_copy_string(orig_peername,peer->name,sizeof(orig_peername)); - orig_peer_cdr = peer_cdr; - + if (!chan_cdr || (chan_cdr && !ast_test_flag(chan_cdr, AST_CDR_FLAG_POST_DISABLED))) { if (chan_cdr) { diff --git a/main/file.c b/main/file.c index 57bf1570c..ffae33b5a 100644 --- a/main/file.c +++ b/main/file.c @@ -147,7 +147,6 @@ int ast_stopstream(struct ast_channel *tmp) int ast_writestream(struct ast_filestream *fs, struct ast_frame *f) { int res = -1; - int alt = 0; if (f->frametype == AST_FRAME_VIDEO) { if (AST_FORMAT_GET_TYPE(fs->fmt->format.id) == AST_FORMAT_TYPE_AUDIO) { /* This is the audio portion. Call the video one... */ @@ -160,9 +159,6 @@ int ast_writestream(struct ast_filestream *fs, struct ast_frame *f) return ast_writestream(fs->vfs, f); /* else ignore */ return 0; - } else { - /* Might / might not have mark set */ - alt = 1; } } else if (f->frametype != AST_FRAME_VOICE) { ast_log(LOG_WARNING, "Tried to write non-voice frame\n"); diff --git a/main/fskmodem_float.c b/main/fskmodem_float.c index f77300979..bc873eac5 100644 --- a/main/fskmodem_float.c +++ b/main/fskmodem_float.c @@ -225,9 +225,7 @@ int fsk_serial(fsk_data *fskd, short *buffer, int *len, int *outbyte) int i,j,n1,r; int samples = 0; int olen; - int beginlen=*len; - int beginlenx; - + switch (fskd->state) { /* Pick up where we left off */ case STATE_SEARCH_STARTBIT2: @@ -255,7 +253,6 @@ int fsk_serial(fsk_data *fskd, short *buffer, int *len, int *outbyte) beginning of a start bit in the TDD sceanario. It just looks for sufficient level to maybe, perhaps, guess, maybe that its maybe the beginning of a start bit, perhaps. This whole thing stinks! */ - beginlenx=beginlen; /* just to avoid unused war warnings */ if (demodulator(fskd, &fskd->x1, GET_SAMPLE)) return -1; samples++; diff --git a/main/manager.c b/main/manager.c index 0c6a650c1..d3c307416 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1717,7 +1717,7 @@ static const char *__astman_get_header(const struct message *m, char *var, int m } } - return ""; + return result; } /*! \brief diff --git a/main/pbx.c b/main/pbx.c index 366139675..321b29a01 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -6692,7 +6692,6 @@ static int manager_show_dialplan(struct mansession *s, const struct message *m) const char *exten, *context; const char *id = astman_get_header(m, "ActionID"); char idtext[256]; - int res; /* Variables used for different counters */ struct dialplan_counters counters; @@ -6707,7 +6706,7 @@ static int manager_show_dialplan(struct mansession *s, const struct message *m) exten = astman_get_header(m, "Extension"); context = astman_get_header(m, "Context"); - res = manager_show_dialplan_helper(s, m, idtext, context, exten, &counters, NULL); + manager_show_dialplan_helper(s, m, idtext, context, exten, &counters, NULL); if (context && !counters.context_existence) { char errorbuf[BUFSIZ]; @@ -7540,7 +7539,7 @@ static const char * const months[] = int ast_build_timing(struct ast_timing *i, const char *info_in) { - char *info_save, *info; + char *info; int j, num_fields, last_sep = -1; /* Check for empty just in case */ @@ -7549,7 +7548,7 @@ int ast_build_timing(struct ast_timing *i, const char *info_in) } /* make a copy just in case we were passed a static string */ - info_save = info = ast_strdupa(info_in); + info = ast_strdupa(info_in); /* count the number of fields in the timespec */ for (j = 0, num_fields = 1; info[j] != '\0'; j++) { diff --git a/main/plc.c b/main/plc.c index ef549ca2c..ef2131215 100644 --- a/main/plc.c +++ b/main/plc.c @@ -177,10 +177,8 @@ int plc_fillin(plc_state_t *s, int16_t amp[], int len) float old_weight; float new_weight; float gain; - int16_t *orig_amp; int orig_len; - orig_amp = amp; orig_len = len; if (s->missing_samples == 0) { /* As the gap in real speech starts we need to assess the last known pitch, diff --git a/main/rtp_engine.c b/main/rtp_engine.c index 62a515b24..acd6c4a2c 100644 --- a/main/rtp_engine.c +++ b/main/rtp_engine.c @@ -1283,8 +1283,8 @@ enum ast_bridge_result ast_rtp_instance_bridge(struct ast_channel *c0, struct as *tinstance0 = NULL, *tinstance1 = NULL; struct ast_rtp_glue *glue0, *glue1; struct ast_sockaddr addr1, addr2; - enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID, text_glue0_res = AST_RTP_GLUE_RESULT_FORBID; - enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID, text_glue1_res = AST_RTP_GLUE_RESULT_FORBID; + enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID; + enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID; enum ast_bridge_result res = AST_BRIDGE_FAILED; struct ast_format_cap *cap0 = ast_format_cap_alloc_nolock(); struct ast_format_cap *cap1 = ast_format_cap_alloc_nolock(); @@ -1317,11 +1317,9 @@ enum ast_bridge_result ast_rtp_instance_bridge(struct ast_channel *c0, struct as audio_glue0_res = glue0->get_rtp_info(c0, &instance0); video_glue0_res = glue0->get_vrtp_info ? glue0->get_vrtp_info(c0, &vinstance0) : AST_RTP_GLUE_RESULT_FORBID; - text_glue0_res = glue0->get_trtp_info ? glue0->get_trtp_info(c0, &tinstance0) : AST_RTP_GLUE_RESULT_FORBID; audio_glue1_res = glue1->get_rtp_info(c1, &instance1); video_glue1_res = glue1->get_vrtp_info ? glue1->get_vrtp_info(c1, &vinstance1) : AST_RTP_GLUE_RESULT_FORBID; - text_glue1_res = glue1->get_trtp_info ? glue1->get_trtp_info(c1, &tinstance1) : AST_RTP_GLUE_RESULT_FORBID; /* If we are carrying video, and both sides are not going to remotely bridge... fail the native bridge */ if (video_glue0_res != AST_RTP_GLUE_RESULT_FORBID && (audio_glue0_res != AST_RTP_GLUE_RESULT_REMOTE || video_glue0_res != AST_RTP_GLUE_RESULT_REMOTE)) { @@ -1433,8 +1431,8 @@ void ast_rtp_instance_early_bridge_make_compatible(struct ast_channel *c0, struc *vinstance0 = NULL, *vinstance1 = NULL, *tinstance0 = NULL, *tinstance1 = NULL; struct ast_rtp_glue *glue0, *glue1; - enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID, text_glue0_res = AST_RTP_GLUE_RESULT_FORBID; - enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID, text_glue1_res = AST_RTP_GLUE_RESULT_FORBID; + enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID; + enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID; struct ast_format_cap *cap0 = ast_format_cap_alloc_nolock(); struct ast_format_cap *cap1 = ast_format_cap_alloc_nolock(); int res = 0; @@ -1459,11 +1457,9 @@ void ast_rtp_instance_early_bridge_make_compatible(struct ast_channel *c0, struc audio_glue0_res = glue0->get_rtp_info(c0, &instance0); video_glue0_res = glue0->get_vrtp_info ? glue0->get_vrtp_info(c0, &vinstance0) : AST_RTP_GLUE_RESULT_FORBID; - text_glue0_res = glue0->get_trtp_info ? glue0->get_trtp_info(c0, &tinstance0) : AST_RTP_GLUE_RESULT_FORBID; audio_glue1_res = glue1->get_rtp_info(c1, &instance1); video_glue1_res = glue1->get_vrtp_info ? glue1->get_vrtp_info(c1, &vinstance1) : AST_RTP_GLUE_RESULT_FORBID; - text_glue1_res = glue1->get_trtp_info ? glue1->get_trtp_info(c1, &tinstance1) : AST_RTP_GLUE_RESULT_FORBID; /* If we are carrying video, and both sides are not going to remotely bridge... fail the native bridge */ if (video_glue0_res != AST_RTP_GLUE_RESULT_FORBID && (audio_glue0_res != AST_RTP_GLUE_RESULT_REMOTE || video_glue0_res != AST_RTP_GLUE_RESULT_REMOTE)) { @@ -1525,8 +1521,8 @@ int ast_rtp_instance_early_bridge(struct ast_channel *c0, struct ast_channel *c1 *vinstance0 = NULL, *vinstance1 = NULL, *tinstance0 = NULL, *tinstance1 = NULL; struct ast_rtp_glue *glue0, *glue1; - enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID, text_glue0_res = AST_RTP_GLUE_RESULT_FORBID; - enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID, text_glue1_res = AST_RTP_GLUE_RESULT_FORBID; + enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID; + enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID; struct ast_format_cap *cap0 = ast_format_cap_alloc_nolock(); struct ast_format_cap *cap1 = ast_format_cap_alloc_nolock(); int res = 0; @@ -1558,11 +1554,9 @@ int ast_rtp_instance_early_bridge(struct ast_channel *c0, struct ast_channel *c1 audio_glue0_res = glue0->get_rtp_info(c0, &instance0); video_glue0_res = glue0->get_vrtp_info ? glue0->get_vrtp_info(c0, &vinstance0) : AST_RTP_GLUE_RESULT_FORBID; - text_glue0_res = glue0->get_trtp_info ? glue0->get_trtp_info(c0, &tinstance0) : AST_RTP_GLUE_RESULT_FORBID; audio_glue1_res = glue1->get_rtp_info(c1, &instance1); video_glue1_res = glue1->get_vrtp_info ? glue1->get_vrtp_info(c1, &vinstance1) : AST_RTP_GLUE_RESULT_FORBID; - text_glue1_res = glue1->get_trtp_info ? glue1->get_trtp_info(c1, &tinstance1) : AST_RTP_GLUE_RESULT_FORBID; /* If we are carrying video, and both sides are not going to remotely bridge... fail the native bridge */ if (video_glue0_res != AST_RTP_GLUE_RESULT_FORBID && (audio_glue0_res != AST_RTP_GLUE_RESULT_REMOTE || video_glue0_res != AST_RTP_GLUE_RESULT_REMOTE)) { diff --git a/main/udptl.c b/main/udptl.c index ab395876d..28afe1f47 100644 --- a/main/udptl.c +++ b/main/udptl.c @@ -664,7 +664,6 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl) int res; struct ast_sockaddr addr; uint16_t seqno = 0; - uint16_t *udptlheader; /* Cache where the header will go */ res = ast_recvfrom(udptl->fd, @@ -672,7 +671,6 @@ struct ast_frame *ast_udptl_read(struct ast_udptl *udptl) sizeof(udptl->rawdata) - AST_FRIENDLY_OFFSET, 0, &addr); - udptlheader = (uint16_t *)(udptl->rawdata + AST_FRIENDLY_OFFSET); if (res < 0) { if (errno != EAGAIN) ast_log(LOG_WARNING, "(%s): UDPTL read error: %s\n", |