diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-25 06:02:46 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-25 06:02:46 +0000 |
commit | 2fa222dfb977f3370515f65dc1554af332df8dff (patch) | |
tree | 9f0e2f3fe65a467c6b77f0e812b8f846fc800577 /res/res_smdi.c | |
parent | a52b96290e3b067fb43ec5c92176a5d37663a171 (diff) |
Bug 4377 - Round 2 of the loader updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14886 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_smdi.c')
-rw-r--r-- | res/res_smdi.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c index e8607ebe1..8adab88d1 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -59,8 +59,7 @@ static int smdi_load(int reload); /* Use count stuff */ -AST_MUTEX_DEFINE_STATIC(localuser_lock); -static int localusecnt = 0; +STANDARD_USECOUNT_DECL; /*! \brief SMDI interface container. */ struct ast_smdi_interface_container { @@ -505,10 +504,7 @@ void ast_smdi_interface_destroy(struct ast_smdi_interface *iface) ASTOBJ_CONTAINER_DESTROY(&iface->mwi_q); free(iface); - ast_mutex_lock(&localuser_lock); - localusecnt--; - ast_mutex_unlock(&localuser_lock); - ast_update_use_count(); + STANDARD_DECREMENT_USECOUNT; } /*! @@ -692,10 +688,7 @@ static int smdi_load(int reload) ASTOBJ_CONTAINER_LINK(&smdi_ifaces, iface); ASTOBJ_UNREF(iface, ast_smdi_interface_destroy); - ast_mutex_lock(&localuser_lock); - localusecnt++; - ast_mutex_unlock(&localuser_lock); - ast_update_use_count(); + STANDARD_INCREMENT_USECOUNT; } else { ast_log(LOG_NOTICE, "Ignoring unknown option %s in %s\n", v->name, config_file); } |