]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If a Zap channel contains a spy or a spy is added take it out of the conference in...
authorJoshua Colp <jcolp@digium.com>
Thu, 1 Nov 2007 01:53:55 +0000 (01:53 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 1 Nov 2007 01:53:55 +0000 (01:53 +0000)
(closes issue #10060)
Reported by: mparker

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87970 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 3da5eaf89d8fdf9db08843a6a84adb9e895f7ff5..f5aa159fb8d6111d8a9f3a701d1bd2fbb8473c44 100644 (file)
@@ -1572,7 +1572,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
                goto outrun;
        }
 
-       retryzap = strcasecmp(chan->tech->type, "Zap");
+       retryzap = (strcasecmp(chan->tech->type, "Zap") || chan->spies ? 1 : 0);
        user->zapchannel = !retryzap;
 
  zapretry:
@@ -1890,14 +1890,14 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
                                break;
 
                        if (c) {
-                               if (c->fds[0] != origfd) {
+                               if (c->fds[0] != origfd || (user->zapchannel && chan->spies)) {
                                        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");
+                                       retryzap = (strcasecmp(chan->tech->type, "Zap") || chan->spies ? 1 : 0);
                                        user->zapchannel = !retryzap;
                                        goto zapretry;
                                }