diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-23 22:46:31 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-23 22:46:31 +0000 |
commit | c7776916251e958e39a2fefd6a28a92fda4db23a (patch) | |
tree | 13789be06a91f943c067cfb42b6a1219d6328d6f /channels/chan_features.c | |
parent | 2fca1655a1f427219d3a65e2c403a76bde344352 (diff) |
Update channel drivers to use module referencing so that unloading them while in use will not result in crashes. (issue #8897 reported by junky)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51788 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_features.c')
-rw-r--r-- | channels/chan_features.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/channels/chan_features.c b/channels/chan_features.c index 89fe1f903..295b5a0f8 100644 --- a/channels/chan_features.c +++ b/channels/chan_features.c @@ -65,9 +65,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") static const char tdesc[] = "Feature Proxy Channel Driver"; -static int usecnt =0; -AST_MUTEX_DEFINE_STATIC(usecnt_lock); - #define IS_OUTBOUND(a,b) (a == b->chan ? 1 : 0) struct feature_sub { @@ -492,10 +489,7 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in p->subs[index].owner = tmp; if (!p->owner) p->owner = tmp; - ast_mutex_lock(&usecnt_lock); - usecnt++; - ast_mutex_unlock(&usecnt_lock); - ast_update_use_count(); + ast_module_ref(ast_module_info->self); return tmp; } |