[asterisk-commits] pcadach: branch 1.4 r51615 - in /branches/1.4/channels: Makefile chan_h323.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jan 22 23:51:52 MST 2007


Author: pcadach
Date: Tue Jan 23 00:51:51 2007
New Revision: 51615

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51615
Log:
Do not abort Asterisk startup if h323 configuration file not found (reported by mithraen)

Modified:
    branches/1.4/channels/Makefile
    branches/1.4/channels/chan_h323.c

Modified: branches/1.4/channels/Makefile
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/Makefile?view=diff&rev=51615&r1=51614&r2=51615
==============================================================================
--- branches/1.4/channels/Makefile (original)
+++ branches/1.4/channels/Makefile Tue Jan 23 00:51:51 2007
@@ -100,11 +100,11 @@
 ifeq ($(OSARCH),linux-gnu)
 chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS)
+	$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS)
 else
 chan_h323.so: chan_h323.o h323/libchanh323.a
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-	$(CMD_PREFIX) $(CXX) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
+	$(CMD_PREFIX) $(CXX) $(PTHREAD_CFLAGS) $(ASTLDFLAGS) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
 endif
 
 chan_misdn.o: ASTCFLAGS+=-Imisdn

Modified: branches/1.4/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_h323.c?view=diff&rev=51615&r1=51614&r2=51615
==============================================================================
--- branches/1.4/channels/chan_h323.c (original)
+++ branches/1.4/channels/chan_h323.c Tue Jan 23 00:51:51 2007
@@ -3091,13 +3091,17 @@
 	ASTOBJ_CONTAINER_INIT(&aliasl);
 	res = reload_config(0);
 	if (res) {
+		/* No config entry */
+		ast_log(LOG_NOTICE, "Unload and load chan_h323.so again in order to receive configuration changes.\n");
 		ast_cli_unregister(&cli_h323_reload);
 		io_context_destroy(io);
+		io = NULL;
 		sched_context_destroy(sched);
+		sched = NULL;
 		ASTOBJ_CONTAINER_DESTROY(&userl);
 		ASTOBJ_CONTAINER_DESTROY(&peerl);
 		ASTOBJ_CONTAINER_DESTROY(&aliasl);
-		return /*AST_MODULE_LOAD_DECLINE*/AST_MODULE_LOAD_FAILURE;
+		return AST_MODULE_LOAD_DECLINE;
 	} else {
 		/* Make sure we can register our channel type */
 		if (ast_channel_register(&oh323_tech)) {
@@ -3227,8 +3231,10 @@
 	if (!gatekeeper_disable)
 		h323_gk_urq();
 	h323_end_process();
-	io_context_destroy(io);
-	sched_context_destroy(sched);
+	if (io)
+		io_context_destroy(io);
+	if (sched)
+		sched_context_destroy(sched);
 
 	ASTOBJ_CONTAINER_DESTROYALL(&userl, oh323_destroy_user);
 	ASTOBJ_CONTAINER_DESTROY(&userl);



More information about the asterisk-commits mailing list