[asterisk-commits] rizzo: trunk r46683 - /trunk/channels/chan_oss.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Oct 31 10:58:50 MST 2006


Author: rizzo
Date: Tue Oct 31 11:58:49 2006
New Revision: 46683

URL: http://svn.digium.com/view/asterisk?rev=46683&view=rev
Log:
remove old/useless usecount management code.


Modified:
    trunk/channels/chan_oss.c

Modified: trunk/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_oss.c?rev=46683&r1=46682&r2=46683&view=diff
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Tue Oct 31 11:58:49 2006
@@ -280,10 +280,6 @@
 #ifndef MAX
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
-
-
-static int usecnt;
-AST_MUTEX_DEFINE_STATIC(usecnt_lock);
 
 static char *config = "oss.conf";	/* default config file */
 
@@ -841,9 +837,6 @@
 	c->tech_pvt = NULL;
 	o->owner = NULL;
 	ast_verbose(" << Hangup on console >> \n");
-	ast_mutex_lock(&usecnt_lock);	/* XXX not sure why */
-	usecnt--;
-	ast_mutex_unlock(&usecnt_lock);
 	if (o->hookstate) {
 		if (o->autoanswer || o->autohangup) {
 			/* Assume auto-hangup too */
@@ -1022,10 +1015,6 @@
 
 	o->owner = c;
 	ast_setstate(c, state);
-	ast_mutex_lock(&usecnt_lock);
-	usecnt++;
-	ast_mutex_unlock(&usecnt_lock);
-	ast_update_use_count();
 	ast_jb_configure(c, &global_jbconf);
 	if (state != AST_STATE_DOWN) {
 		if (ast_pbx_start(c)) {
@@ -1033,7 +1022,6 @@
 			ast_hangup(c);
 			o->owner = c = NULL;
 			/* XXX what about the channel itself ? */
-			/* XXX what about usecnt ? */
 		}
 	}
 



More information about the asterisk-commits mailing list