[asterisk-commits] twilson: branch twilson/calendaring r189274 - /team/twilson/calendaring/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Apr 19 22:21:59 CDT 2009


Author: twilson
Date: Sun Apr 19 22:21:55 2009
New Revision: 189274

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189274
Log:
Disable unloading by bumping the ref count for now

After discussing withe file, bump the refcount on the module to
disable unloading. I'm leaving the unload code in for now,
just because.

Modified:
    team/twilson/calendaring/res/res_calendar.c

Modified: team/twilson/calendaring/res/res_calendar.c
URL: http://svn.digium.com/svn-view/asterisk/team/twilson/calendaring/res/res_calendar.c?view=diff&rev=189274&r1=189273&r2=189274
==============================================================================
--- team/twilson/calendaring/res/res_calendar.c (original)
+++ team/twilson/calendaring/res/res_calendar.c Sun Apr 19 22:21:55 2009
@@ -1506,6 +1506,7 @@
 	return NULL;
 }
 
+/* If I were to allow unloading it would look something like this */
 static int unload_module(void)
 {
 	struct ast_calendar_tech *tech;
@@ -1565,6 +1566,9 @@
 
 	ast_devstate_prov_add("Calendar", calendarstate);
 
+	/* Since other modules depend on this, disable unloading */
+	ast_module_ref(ast_module_info->self);
+
 	return 0;
 }
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Asterisk Calendar integration",




More information about the asterisk-commits mailing list