[asterisk-commits] pcadach: branch pcadach/chan_h323-live r43326 - /team/pcadach/chan_h323-live/...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Sep 20 07:35:55 MST 2006


Author: pcadach
Date: Wed Sep 20 09:35:55 2006
New Revision: 43326

URL: http://svn.digium.com/view/asterisk?rev=43326&view=rev
Log:
h.323 reload isn't finished, so don't load module without configuration if you can't reload it cleanly (listener, etc. isn't started, commands not registered, etc.

Modified:
    team/pcadach/chan_h323-live/channels/chan_h323.c

Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=43326&r1=43325&r2=43326&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Wed Sep 20 09:35:55 2006
@@ -3093,7 +3093,13 @@
 	ASTOBJ_CONTAINER_INIT(&aliasl);
 	res = reload_config(0);
 	if (res) {
-		return AST_MODULE_LOAD_DECLINE;
+		ast_cli_unregister(&cli_h323_reload);
+		io_context_destroy(io);
+		sched_context_destroy(sched);
+		ASTOBJ_CONTAINER_DESTROY(&userl);
+		ASTOBJ_CONTAINER_DESTROY(&peerl);
+		ASTOBJ_CONTAINER_DESTROY(&aliasl);
+		return /*AST_MODULE_LOAD_DECLINE*/AST_MODULE_LOAD_FAILURE;
 	} else {
 		/* Make sure we can register our channel type */
 		if (ast_channel_register(&oh323_tech)) {
@@ -3155,7 +3161,7 @@
 			if (h323_set_gk(gatekeeper_discover, gatekeeper, secret)) {
 				ast_log(LOG_ERROR, "Gatekeeper registration failed.\n");
 				gatekeeper_disable = 1;
-				return AST_MODULE_LOAD_SUCCESS;
+				res = AST_MODULE_LOAD_SUCCESS;
 			}
 		}
 		/* And start the monitor for the first time */



More information about the asterisk-commits mailing list