[zaptel-commits] tzafrir: branch 1.4 r4625 - /branches/1.4/kernel/xpp/xproto.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Sun Feb 8 23:58:55 CST 2009


Author: tzafrir
Date: Sun Feb  8 23:58:55 2009
New Revision: 4625

URL: http://svn.digium.com/svn-view/zaptel?view=rev&rev=4625
Log:
Fix building Zaptel with module unloading disabled

As moduel_refcount is only used for debugging, disable it in this
non-common case.
(Issue #14402)

Modified:
    branches/1.4/kernel/xpp/xproto.c

Modified: branches/1.4/kernel/xpp/xproto.c
URL: http://svn.digium.com/svn-view/zaptel/branches/1.4/kernel/xpp/xproto.c?view=diff&rev=4625&r1=4624&r2=4625
==============================================================================
--- branches/1.4/kernel/xpp/xproto.c (original)
+++ branches/1.4/kernel/xpp/xproto.c Sun Feb  8 23:58:55 2009
@@ -93,7 +93,9 @@
 	}
 	if(xtable) {
 		BUG_ON(!xtable->owner);
+#ifdef CONFIG_MODULE_UNLOAD
 		DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
+#endif
 		if(!try_module_get(xtable->owner)) {
 			ERR("%s: try_module_get for %s failed.\n", __FUNCTION__, xtable->name);
 			return NULL;
@@ -105,8 +107,10 @@
 void xproto_put(const xproto_table_t *xtable)
 {
 	BUG_ON(!xtable);
+#ifdef CONFIG_MODULE_UNLOAD
 	DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
 	BUG_ON(module_refcount(xtable->owner) <= 0);
+#endif
 	module_put(xtable->owner);
 }
 




More information about the zaptel-commits mailing list