[svn-commits] oej: branch oej/pinepeach r215020 - /team/oej/pinepeach/res/res_mutestream.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Aug 31 13:07:45 CDT 2009


Author: oej
Date: Mon Aug 31 13:07:42 2009
New Revision: 215020

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215020
Log:
Adding module ref/unref - thanks kpfleming

Modified:
    team/oej/pinepeach/res/res_mutestream.c

Modified: team/oej/pinepeach/res/res_mutestream.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/oej/pinepeach/res/res_mutestream.c?view=diff&rev=215020&r1=215019&r2=215020
==============================================================================
--- team/oej/pinepeach/res/res_mutestream.c (original)
+++ team/oej/pinepeach/res/res_mutestream.c Mon Aug 31 13:07:42 2009
@@ -69,6 +69,7 @@
 	/* Destroy the audiohook, and destroy ourselves */
 	ast_audiohook_destroy(&mute->audiohook);
 	free(mute);
+	ast_module_unref(ast_module_info->self);
 
 	return;
 }
@@ -164,6 +165,7 @@
 			ast_log(LOG_ERROR, "Failed to attach audiohook for muting channel %s\n", chan->name);
 			return -1;
 		} 
+		ast_module_ref(ast_module_info->self);
 		if (option_debug) {
 			ast_log(LOG_DEBUG, "*** Initialized audiohook on channel %s\n", chan->name);
 		}
@@ -312,8 +314,7 @@
 	/* Unregister AMI actions */
         ast_manager_unregister("MuteStream");
 
-	/* Can't unload this once we're loaded */
-	return -1;
+	return 0;
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "MUTE resource",




More information about the svn-commits mailing list