don't take locks when reading usecounts, they are not necessary (bug #4585)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Kevin P. Fleming 20 years ago
parent 442f3b15a1
commit 6a0fdb312f

@ -249,14 +249,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&g723_lock)) {
ast_log(LOG_WARNING, "Unable to lock g723 list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&g723_lock);
return res;
return glistcnt;
}
char *description()

@ -482,14 +482,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&g726_lock)) {
ast_log(LOG_WARNING, "Unable to lock g726 list.\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&g726_lock);
return res;
return glistcnt;
}
char *description()

@ -229,14 +229,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&g729_lock)) {
ast_log(LOG_WARNING, "Unable to lock g729 list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&g729_lock);
return res;
return glistcnt;
}
char *description()

@ -252,14 +252,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&gsm_lock)) {
ast_log(LOG_WARNING, "Unable to lock gsm list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&gsm_lock);
return res;
return glistcnt;
}
char *description()

@ -250,14 +250,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&h263_lock)) {
ast_log(LOG_WARNING, "Unable to lock h263 list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&h263_lock);
return res;
return glistcnt;
}
char *description()

@ -231,14 +231,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&ilbc_lock)) {
ast_log(LOG_WARNING, "Unable to lock ilbc list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&ilbc_lock);
return res;
return glistcnt;
}
char *description()

@ -219,14 +219,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&pcm_lock)) {
ast_log(LOG_WARNING, "Unable to lock pcm list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&pcm_lock);
return res;
return glistcnt;
}
char *description()

@ -299,14 +299,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&pcm_lock)) {
ast_log(LOG_WARNING, "Unable to lock pcm list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&pcm_lock);
return res;
return glistcnt;
}
char *description()

@ -218,14 +218,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&slinear_lock)) {
ast_log(LOG_WARNING, "Unable to lock slinear list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&slinear_lock);
return res;
return glistcnt;
}
char *description()

@ -222,14 +222,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&vox_lock)) {
ast_log(LOG_WARNING, "Unable to lock vox list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&vox_lock);
return res;
return glistcnt;
}
char *description()

@ -574,14 +574,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&wav_lock)) {
ast_log(LOG_WARNING, "Unable to lock wav list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&wav_lock);
return res;
return glistcnt;
}
char *description()

@ -555,14 +555,7 @@ int unload_module()
int usecount()
{
int res;
if (ast_mutex_lock(&wav_lock)) {
ast_log(LOG_WARNING, "Unable to lock wav list\n");
return -1;
}
res = glistcnt;
ast_mutex_unlock(&wav_lock);
return res;
return glistcnt;
}
char *description()

Loading…
Cancel
Save