Another big chunk of changes from the RSW branch. Bunch of stuff from main/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Sean Bright
2008-08-10 19:35:50 +00:00
parent 3ffb39833b
commit b69c8e6ab5
22 changed files with 372 additions and 372 deletions

View File

@@ -277,7 +277,7 @@ static void history_calc_maxbuf(jitterbuf *jb)
static void history_get(jitterbuf *jb)
{
long max, min, jitter;
int index;
int idx;
int count;
if (!jb->hist_maxbuf_valid)
@@ -286,22 +286,21 @@ static void history_get(jitterbuf *jb)
/* count is how many items in history we're examining */
count = (jb->hist_ptr < JB_HISTORY_SZ) ? jb->hist_ptr : JB_HISTORY_SZ;
/* index is the "n"ths highest/lowest that we'll look for */
index = count * JB_HISTORY_DROPPCT / 100;
/* idx is the "n"ths highest/lowest that we'll look for */
idx = count * JB_HISTORY_DROPPCT / 100;
/* sanity checks for index */
if (index > (JB_HISTORY_MAXBUF_SZ - 1))
index = JB_HISTORY_MAXBUF_SZ - 1;
/* sanity checks for idx */
if (idx > (JB_HISTORY_MAXBUF_SZ - 1))
idx = JB_HISTORY_MAXBUF_SZ - 1;
if (index < 0) {
if (idx < 0) {
jb->info.min = 0;
jb->info.jitter = 0;
return;
}
max = jb->hist_maxbuf[index];
min = jb->hist_minbuf[index];
max = jb->hist_maxbuf[idx];
min = jb->hist_minbuf[idx];
jitter = max - min;