automerge commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@51880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Automerge Script
2007-01-24 01:19:59 +00:00
parent a94d625209
commit 260eccbb03
2 changed files with 7 additions and 5 deletions

View File

@@ -275,8 +275,8 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
pbx_builtin_setvar_helper(chan, my_name, NULL); pbx_builtin_setvar_helper(chan, my_name, NULL);
snprintf(end_varname,VAR_SIZE,"END_%s",varname); snprintf(end_varname,VAR_SIZE,"END_%s",varname);
if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) { if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) {
pbx_builtin_setvar_helper(chan, end_varname, NULL);
ast_parseable_goto(chan, goto_str); ast_parseable_goto(chan, goto_str);
pbx_builtin_setvar_helper(chan, end_varname, NULL);
} else { } else {
int pri = find_matching_endwhile(chan); int pri = find_matching_endwhile(chan);
if (pri > 0) { if (pri > 0) {

View File

@@ -1958,9 +1958,10 @@ struct ast_frame *ast_read(struct ast_channel *chan)
#ifndef MONITOR_CONSTANT_DELAY #ifndef MONITOR_CONSTANT_DELAY
int jump = chan->outsmpl - chan->insmpl - 4 * f->samples; int jump = chan->outsmpl - chan->insmpl - 4 * f->samples;
if (jump >= 0) { if (jump >= 0) {
if (ast_seekstream(chan->monitor->read_stream, jump + f->samples, SEEK_FORCECUR) == -1) jump = chan->outsmpl - chan->insmpl;
if (ast_seekstream(chan->monitor->read_stream, jump, SEEK_FORCECUR) == -1)
ast_log(LOG_WARNING, "Failed to perform seek in monitoring read stream, synchronization between the files may be broken\n"); ast_log(LOG_WARNING, "Failed to perform seek in monitoring read stream, synchronization between the files may be broken\n");
chan->insmpl += jump + 4 * f->samples; chan->insmpl += jump + f->samples;
} else } else
chan->insmpl+= f->samples; chan->insmpl+= f->samples;
#else #else
@@ -2313,9 +2314,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
#ifndef MONITOR_CONSTANT_DELAY #ifndef MONITOR_CONSTANT_DELAY
int jump = chan->insmpl - chan->outsmpl - 4 * f->samples; int jump = chan->insmpl - chan->outsmpl - 4 * f->samples;
if (jump >= 0) { if (jump >= 0) {
if (ast_seekstream(chan->monitor->write_stream, jump + f->samples, SEEK_FORCECUR) == -1) jump = chan->insmpl - chan->outsmpl;
if (ast_seekstream(chan->monitor->write_stream, jump, SEEK_FORCECUR) == -1)
ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n"); ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");
chan->outsmpl += jump + 4 * f->samples; chan->outsmpl += jump + f->samples;
} else } else
chan->outsmpl += f->samples; chan->outsmpl += f->samples;
#else #else