[Asterisk-cvs] zaptel wct4xxp.c, 1.56, 1.57 wctdm.c, 1.108, 1.109 wcte11xp.c, 1.9, 1.10

markster at lists.digium.com markster at lists.digium.com
Sun Mar 20 23:19:22 CST 2005


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv2375

Modified Files:
	wct4xxp.c wctdm.c wcte11xp.c 
Log Message:
Add use counts to currently shipping stuff (bug #3773):


Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- wct4xxp.c	15 Jan 2005 22:59:18 -0000	1.56
+++ wct4xxp.c	21 Mar 2005 05:14:11 -0000	1.57
@@ -544,7 +544,10 @@
 {
 #ifndef LINUX26
 	MOD_INC_USE_COUNT;
+#else
+	try_module_get(THIS_MODULE);
 #endif	
+
 	return 0;
 }
 
@@ -552,6 +555,8 @@
 {
 #ifndef LINUX26
 	MOD_DEC_USE_COUNT;
+#else
+	module_put(THIS_MODULE);
 #endif
 	return 0;
 }

Index: wctdm.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wctdm.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- wctdm.c	27 Feb 2005 05:44:42 -0000	1.108
+++ wctdm.c	21 Mar 2005 05:14:11 -0000	1.109
@@ -1722,7 +1722,9 @@
 	wc->usecount++;
 #ifndef LINUX26
 	MOD_INC_USE_COUNT;
-#endif
+#else
+	try_module_get(THIS_MODULE);
+#endif	
 	return 0;
 }
 
@@ -1740,6 +1742,8 @@
 	wc->usecount--;
 #ifndef LINUX26
 	MOD_DEC_USE_COUNT;
+#else
+	module_put(THIS_MODULE);
 #endif
 	for (x=0;x<wc->cards;x++)
 		wc->mod.fxs.idletxhookstate[x] = 1;

Index: wcte11xp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcte11xp.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- wcte11xp.c	15 Jan 2005 22:59:18 -0000	1.9
+++ wcte11xp.c	21 Mar 2005 05:14:11 -0000	1.10
@@ -226,6 +226,8 @@
 	wc->usecount++;
 #ifndef LINUX26	
 	MOD_INC_USE_COUNT;
+#else
+	try_module_get(THIS_MODULE);
 #endif	
 	return 0;
 }
@@ -346,6 +348,8 @@
 	wc->usecount--;
 #ifndef LINUX26	
 	MOD_DEC_USE_COUNT;
+#else
+	module_put(THIS_MODULE);
 #endif
 	/* If we're dead, release us now */
 	if (!wc->usecount && wc->dead) 




More information about the svn-commits mailing list