[asterisk-commits] may: trunk r404198 - /trunk/addons/chan_ooh323.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 18 13:10:47 CST 2013


Author: may
Date: Wed Dec 18 13:10:42 2013
New Revision: 404198

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404198
Log:
Implement module reload command for chan_ooh323

(close issue ASTERISK-22817)

Patches:
	ooh323_module_reload.patch


Modified:
    trunk/addons/chan_ooh323.c

Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=404198&r1=404197&r2=404198
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Wed Dec 18 13:10:42 2013
@@ -3896,6 +3896,22 @@
 	return 0;
 }
 
+static int reload_module(void)
+{
+	ast_mutex_lock(&h323_reload_lock);
+	if (h323_reloading) {
+		ast_verb(0, "Previous OOH323 reload not yet done\n");
+	} else {
+		h323_reloading = 1;
+	}
+	ast_mutex_unlock(&h323_reload_lock);
+	restart_monitor();
+
+	if (gH323Debug)
+		ast_verb(0, "+++   ooh323_reload\n");
+
+	return 0;
+}
 
 static void *do_monitor(void *data)
 {
@@ -5180,4 +5196,9 @@
 }
 #endif
 
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Objective Systems H323 Channel");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Objective Systems H323 Channel",
+			.load = load_module,
+			.unload = unload_module,
+			.reload = reload_module,
+			.load_pri = AST_MODPRI_CHANNEL_DRIVER
+			);




More information about the asterisk-commits mailing list