aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_features.c')
-rwxr-xr-xchannels/chan_features.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_features.c b/channels/chan_features.c
index 5fa1b03a6..312668804 100755
--- a/channels/chan_features.c
+++ b/channels/chan_features.c
@@ -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);