Minor chan_features tweak
authorMark Spencer <markster@digium.com>
Thu, 23 Dec 2004 11:35:21 +0000 (11:35 +0000)
committerMark Spencer <markster@digium.com>
Thu, 23 Dec 2004 11:35:21 +0000 (11:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4545 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_features.c

index 5fa1b03..3126688 100755 (executable)
@@ -142,7 +142,10 @@ static void swap_subs(struct feature_pvt *p, int a, int b)
        }
        if (p->subs[b].owner) {
                for (x=0;x<AST_MAX_FDS;x++)
-                       p->subs[b].owner->fds[x] = p->subchan->fds[x];
+                       if (b)
+                               p->subs[b].owner->fds[x] = -1;
+                       else
+                               p->subs[b].owner->fds[x] = p->subchan->fds[x];
        }
        wakeup_sub(p, a);
        wakeup_sub(p, b);