diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-07-30 20:23:06 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-07-30 20:23:06 +0000 |
commit | cfc0e168ad10ce999ead096fbe6b5d97f5461fb6 (patch) | |
tree | 125ca468047e873db645c7118d60d1d734cc54c1 /channels | |
parent | 65887c0f573a313ecad55c2acc4bc8844eaa7b7f (diff) |
Reset conferencing on final hangup (bug #2172)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3544 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_zap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 09db2807a..e025c89f3 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -1128,6 +1128,17 @@ static int isslavenative(struct zt_pvt *p, struct zt_pvt **out) return useslavenative; } +static int reset_conf(struct zt_pvt *p) +{ + ZT_CONFINFO zi; + p->confno = -1; + if (p->subs[SUB_REAL].zfd > -1) { + if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCONF, &zi)) + ast_log(LOG_WARNING, "Failed to reset conferencing on channel %d!\n", p->channel); + } + return 0; +} + static int update_conf(struct zt_pvt *p) { int needconf = 0; @@ -2177,6 +2188,7 @@ static int zt_hangup(struct ast_channel *ast) p->dialing = 0; p->rdnis[0] = '\0'; update_conf(p); + reset_conf(p); /* Restore data mode */ if (p->sig == SIG_PRI) { x = 0; @@ -2188,6 +2200,7 @@ static int zt_hangup(struct ast_channel *ast) /* Free up the bearer channel as well, and don't use its file descriptor anymore */ update_conf(p->bearer); + reset_conf(p->bearer); p->bearer->owner = NULL; p->bearer = NULL; p->subs[SUB_REAL].zfd = -1; |