[Asterisk-cvs] asterisk/formats format_g723.c, 1.20,
1.21 format_g726.c, 1.11, 1.12 format_g729.c, 1.20,
1.21 format_gsm.c, 1.25, 1.26 format_h263.c, 1.12,
1.13 format_ilbc.c, 1.13, 1.14 format_pcm.c, 1.21,
1.22 format_pcm_alaw.c, 1.19, 1.20 format_sln.c, 1.10,
1.11 format_vox.c, 1.22, 1.23 format_wav.c, 1.25,
1.26 format_wav_gsm.c, 1.34, 1.35
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Thu Jun 23 13:30:21 CDT 2005
Update of /usr/cvsroot/asterisk/formats
In directory mongoose.digium.com:/tmp/cvs-serv21637/formats
Modified Files:
format_g723.c format_g726.c format_g729.c format_gsm.c
format_h263.c format_ilbc.c format_pcm.c format_pcm_alaw.c
format_sln.c format_vox.c format_wav.c format_wav_gsm.c
Log Message:
don't take locks when reading usecounts, they are not necessary (bug #4585)
Index: format_g723.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_g723.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- format_g723.c 7 Jun 2005 17:06:33 -0000 1.20
+++ format_g723.c 23 Jun 2005 17:30:56 -0000 1.21
@@ -249,14 +249,7 @@
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()
Index: format_g726.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_g726.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- format_g726.c 7 Jun 2005 17:06:33 -0000 1.11
+++ format_g726.c 23 Jun 2005 17:30:56 -0000 1.12
@@ -482,14 +482,7 @@
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()
Index: format_g729.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_g729.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- format_g729.c 7 Jun 2005 17:06:33 -0000 1.20
+++ format_g729.c 23 Jun 2005 17:30:56 -0000 1.21
@@ -229,14 +229,7 @@
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()
Index: format_gsm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_gsm.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- format_gsm.c 7 Jun 2005 17:06:33 -0000 1.25
+++ format_gsm.c 23 Jun 2005 17:30:56 -0000 1.26
@@ -252,14 +252,7 @@
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()
Index: format_h263.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_h263.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- format_h263.c 7 Jun 2005 17:06:33 -0000 1.12
+++ format_h263.c 23 Jun 2005 17:30:56 -0000 1.13
@@ -250,14 +250,7 @@
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()
Index: format_ilbc.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_ilbc.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- format_ilbc.c 7 Jun 2005 17:06:33 -0000 1.13
+++ format_ilbc.c 23 Jun 2005 17:30:56 -0000 1.14
@@ -231,14 +231,7 @@
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()
Index: format_pcm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_pcm.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- format_pcm.c 7 Jun 2005 17:06:33 -0000 1.21
+++ format_pcm.c 23 Jun 2005 17:30:56 -0000 1.22
@@ -219,14 +219,7 @@
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()
Index: format_pcm_alaw.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_pcm_alaw.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- format_pcm_alaw.c 7 Jun 2005 17:06:33 -0000 1.19
+++ format_pcm_alaw.c 23 Jun 2005 17:30:56 -0000 1.20
@@ -299,14 +299,7 @@
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()
Index: format_sln.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_sln.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- format_sln.c 17 Jun 2005 13:39:34 -0000 1.10
+++ format_sln.c 23 Jun 2005 17:30:56 -0000 1.11
@@ -218,14 +218,7 @@
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()
Index: format_vox.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_vox.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- format_vox.c 7 Jun 2005 17:06:33 -0000 1.22
+++ format_vox.c 23 Jun 2005 17:30:56 -0000 1.23
@@ -222,14 +222,7 @@
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()
Index: format_wav.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_wav.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- format_wav.c 7 Jun 2005 17:06:33 -0000 1.25
+++ format_wav.c 23 Jun 2005 17:30:56 -0000 1.26
@@ -574,14 +574,7 @@
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()
Index: format_wav_gsm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/formats/format_wav_gsm.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- format_wav_gsm.c 7 Jun 2005 17:06:33 -0000 1.34
+++ format_wav_gsm.c 23 Jun 2005 17:30:56 -0000 1.35
@@ -555,14 +555,7 @@
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()
More information about the svn-commits
mailing list