Replace current spy architecture with backport of audiohooks. This should take care of current known spy issues.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2008-01-16 20:33:47 +00:00
parent 1156daa2e4
commit fa640604de
10 changed files with 1151 additions and 912 deletions

View File

@@ -1578,7 +1578,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
goto outrun;
}
retryzap = (strcasecmp(chan->tech->type, "Zap") || (chan->spies || chan->monitor) ? 1 : 0);
retryzap = (strcasecmp(chan->tech->type, "Zap") || (chan->audiohooks || chan->monitor) ? 1 : 0);
user->zapchannel = !retryzap;
zapretry:
@@ -1896,14 +1896,14 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
break;
if (c) {
if (c->fds[0] != origfd || (user->zapchannel && (c->spies || c->monitor))) {
if (c->fds[0] != origfd || (user->zapchannel && (c->audiohooks || c->monitor))) {
if (using_pseudo) {
/* Kill old pseudo */
close(fd);
using_pseudo = 0;
}
ast_log(LOG_DEBUG, "Ooh, something swapped out under us, starting over\n");
retryzap = (strcasecmp(c->tech->type, "Zap") || (c->spies || c->monitor) ? 1 : 0);
retryzap = (strcasecmp(c->tech->type, "Zap") || (c->audiohooks || c->monitor) ? 1 : 0);
user->zapchannel = !retryzap;
goto zapretry;
}