aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_features.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 18:04:46 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 18:04:46 +0000
commitb2469bcae614ef567ccef6c2f11b6d031477d29f (patch)
tree9a29fea1aa22ebd3df1732cd9babd995a2e02380 /res/res_features.c
parent4d2ea03db9cccd2ac10febd0246e4cf05ad2254c (diff)
Merged revisions 89599 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89599 | file | 2007-11-26 14:02:56 -0400 (Mon, 26 Nov 2007) | 6 lines Add module counting removal for error conditions. (closes issue #11333) Reported by: Laureano Patches: res_features_v2.c.patch uploaded by Laureano (license 265) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89600 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rw-r--r--res/res_features.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 31ce64b1a..59ba1cf44 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -2336,6 +2336,7 @@ static int park_exec(struct ast_channel *chan, void *data)
if (error) {
ast_log(LOG_WARNING, "Failed to play courtesy tone!\n");
ast_hangup(peer);
+ ast_module_user_remove(u);
return -1;
}
} else
@@ -2345,6 +2346,7 @@ static int park_exec(struct ast_channel *chan, void *data)
if (res < 0) {
ast_log(LOG_WARNING, "Could not make channels %s and %s compatible for bridge\n", chan->name, peer->name);
ast_hangup(peer);
+ ast_module_user_remove(u);
return -1;
}
/* This runs sorta backwards, since we give the incoming channel control, as if it
@@ -2370,6 +2372,7 @@ static int park_exec(struct ast_channel *chan, void *data)
/* Simulate the PBX hanging up */
if (res != AST_PBX_NO_HANGUP_PEER)
ast_hangup(peer);
+ ast_module_user_remove(u);
return res;
} else {
/*! \todo XXX Play a message XXX */