Merge Rizzo's waitfor update (bug #4584)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2006-01-30 03:13:33 +00:00
parent f8b6a4db98
commit 37815b2cce
4 changed files with 143 additions and 167 deletions

View File

@@ -233,10 +233,10 @@ static AST_LIST_HEAD_STATIC(agents, agent_pvt); /**< Holds the list of agents (l
int x; \
if (p->chan) { \
for (x=0;x<AST_MAX_FDS;x++) {\
if (x != AST_MAX_FDS - 2) \
if (x != AST_TIMING_FD) \
ast->fds[x] = p->chan->fds[x]; \
} \
ast->fds[AST_MAX_FDS - 3] = p->chan->fds[AST_MAX_FDS - 2]; \
ast->fds[AST_AGENT_FD] = p->chan->fds[AST_TIMING_FD]; \
} \
} while(0)
@@ -445,10 +445,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
CHECK_FORMATS(ast, p);
if (p->chan) {
ast_copy_flags(p->chan, ast, AST_FLAG_EXCEPTION);
if (ast->fdno == AST_MAX_FDS - 3)
p->chan->fdno = AST_MAX_FDS - 2;
else
p->chan->fdno = ast->fdno;
p->chan->fdno = (ast->fdno == AST_AGENT_FD) ? AST_TIMING_FD : ast->fdno;
f = ast_read(p->chan);
} else
f = &null_frame;