diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-26 18:02:56 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-26 18:02:56 +0000 |
commit | 43f7193ecee4c2ee7348fcf7ba1433a9670a1c1e (patch) | |
tree | 115f3d0769662ee416e617162eb33aaba5282f51 /res | |
parent | 3fb4163ceb38807b6d417bc51e43fd2c5d0e2acb (diff) |
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/branches/1.4@89599 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_features.c b/res/res_features.c index 5fad42967..ad096a5ae 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1921,6 +1921,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 @@ -1930,6 +1931,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 @@ -1950,6 +1952,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 */ |