[asterisk-commits] rizzo: trunk r47075 - /trunk/channels/chan_alsa.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 3 05:21:40 MST 2006


Author: rizzo
Date: Fri Nov  3 06:21:40 2006
New Revision: 47075

URL: http://svn.digium.com/view/asterisk?rev=47075&view=rev
Log:
remove useless usecnt stuff


Modified:
    trunk/channels/chan_alsa.c

Modified: trunk/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_alsa.c?rev=47075&r1=47074&r2=47075&view=diff
==============================================================================
--- trunk/channels/chan_alsa.c (original)
+++ trunk/channels/chan_alsa.c Fri Nov  3 06:21:40 2006
@@ -113,11 +113,9 @@
 static struct timeval lasttime;
 #endif
 
-static int usecnt;
 static int silencesuppression = 0;
 static int silencethreshold = 1000;
 
-AST_MUTEX_DEFINE_STATIC(usecnt_lock);
 AST_MUTEX_DEFINE_STATIC(alsalock);
 
 static const char tdesc[] = "ALSA Console Channel Driver";
@@ -581,9 +579,6 @@
 	c->tech_pvt = NULL;
 	alsa.owner = NULL;
 	ast_verbose(" << Hangup on console >> \n");
-	ast_mutex_lock(&usecnt_lock);
-	usecnt--;
-	ast_mutex_unlock(&usecnt_lock);
 	if (hookstate) {
 		hookstate = 0;
 		if (!autoanswer) {
@@ -811,10 +806,6 @@
 		ast_string_field_set(tmp, language, language);
 	p->owner = tmp;
 	ast_setstate(tmp, state);
-	ast_mutex_lock(&usecnt_lock);
-	usecnt++;
-	ast_mutex_unlock(&usecnt_lock);
-	ast_update_use_count();
 	ast_jb_configure(tmp, &global_jbconf);
 	if (state != AST_STATE_DOWN) {
 		if (ast_pbx_start(tmp)) {



More information about the asterisk-commits mailing list