[asterisk-commits] may: branch may/chan_ooh323_evo r378193 - in /team/may/chan_ooh323_evo: ./ ch...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 21 15:30:32 CST 2012


Author: may
Date: Fri Dec 21 15:30:22 2012
New Revision: 378193

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378193
Log:
Multiple revisions 377844,377846,377867,377878,377880,377884,377906,377911,377915

........
  r377844 | mmichelson | 2012-12-12 00:53:34 +0400 (Wed, 12 Dec 2012) | 19 lines
  
  Fix crash that can occur if CLI registration fails for an aliased command.
  
  A recent memory leak fix in main/cli.c causes an ast_cli_entry's command
  field to be freed and NULLed if ast_cli_register() fails. res_clialiases
  was ignoring the return value of ast_cli_register() and was then passing
  the NULL command off to a a hash function. This resulted in a crash.
  
  The fix is not to ignore the erroneous return value. If ast_cli_register()
  fails, then we do not continue trying to process the current alias.
  ........
  
  Merged revisions 377840 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377842 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377843 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r377846 | mmichelson | 2012-12-12 01:04:45 +0400 (Wed, 12 Dec 2012) | 13 lines
  
  Add UUID support to Asterisk.
  
  This provides a common API for dealing with unique identifiers.
  The API provides methods to create, parse, copy, and stringify UUIDs.
  
  An accompanying unit test is provided that tests all operations.
  
  (closes issue ASTERISK-20726)
  reported by Matt Jordan
  
  Review: https://reviewboard.asterisk.org/r/2217
........
  r377867 | rmudgett | 2012-12-12 01:22:45 +0400 (Wed, 12 Dec 2012) | 20 lines
  
  Cleanup udptl on exit.
  
  * Cleanup CLI commands on exit.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        udptl-shutdown-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
        udptl-shutdown-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........
  
  Merged revisions 377847 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377848 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377849 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r377878 | mmichelson | 2012-12-12 01:47:53 +0400 (Wed, 12 Dec 2012) | 3 lines
  
  Remove automerge properties.
........
  r377880 | mmichelson | 2012-12-12 01:53:06 +0400 (Wed, 12 Dec 2012) | 3 lines
  
  And remove svnmerge-integrated property.
........
  r377884 | rmudgett | 2012-12-12 02:03:23 +0400 (Wed, 12 Dec 2012) | 16 lines
  
  Cleanup CLI commands on exit for several files.
  
  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        unregister-cli-multiple-all.patch (license #5909) patch uploaded by Corey Farrell
  ........
  
  Merged revisions 377881 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377882 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377883 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r377906 | mmichelson | 2012-12-12 02:42:11 +0400 (Wed, 12 Dec 2012) | 3 lines
  
  Add test events necessary for bridging tests to be able to properly run.
........
  r377911 | mmichelson | 2012-12-12 04:02:31 +0400 (Wed, 12 Dec 2012) | 22 lines
  
  Fix a potential deadlock in chan_sip during transfers.
  
  The issue comes from the fact that transfers may perform
  a redirecting update on a channel. The issue is that lock
  inversion between the channel and its tech_pvt occurs since
  the channel lock is released during the transfer process.
  
  The fix is to move when the redirecting update occurs to a
  place where neither the tech_pvt or the channel is locked so
  that the two can be locked in the proper order.
  
  (closes issue ASTERISK-20708)
  reported by Mark Michelson
  patches:
  	ASTERISK-20708-3.patch uploaded by Mark Michelson (License #5049)
  
  Tested by:
  	Tim Ringenbach at Asteria Solutions Group
  ........
  
  Merged revisions 377910 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r377915 | elguero | 2012-12-12 08:43:18 +0400 (Wed, 12 Dec 2012) | 17 lines
  
  Convert Dynamic Features Buffer To Use ast_str
  
  Currently, the buffer for the dynamic features list is set to a fixed size of
  128.  If the list is bigger than that, it results in the dynamic feature(s) not
  being recognized.
  
  This patch changes the buffer from a fixed size to a dynamic one.
  
  (closes issue ASTERISK-20680)
  Reported by: Clod Patry
  Tested by: Michael L. Young
  Patches: 
      asterisk-20680-dynamic-features-v2.diff 
                                       uploaded by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2221/
........

Merged revisions 377844,377846,377867,377878,377880,377884,377906,377911,377915 from http://svn.asterisk.org/svn/asterisk/trunk

Added:
    team/may/chan_ooh323_evo/include/asterisk/uuid.h
      - copied unchanged from r377915, trunk/include/asterisk/uuid.h
    team/may/chan_ooh323_evo/main/uuid.c
      - copied unchanged from r377915, trunk/main/uuid.c
    team/may/chan_ooh323_evo/tests/test_uuid.c
      - copied unchanged from r377915, trunk/tests/test_uuid.c
Modified:
    team/may/chan_ooh323_evo/   (props changed)
    team/may/chan_ooh323_evo/channels/chan_sip.c
    team/may/chan_ooh323_evo/configure
    team/may/chan_ooh323_evo/configure.ac
    team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in
    team/may/chan_ooh323_evo/main/Makefile
    team/may/chan_ooh323_evo/main/aoc.c
    team/may/chan_ooh323_evo/main/asterisk.c
    team/may/chan_ooh323_evo/main/cel.c
    team/may/chan_ooh323_evo/main/channel.c
    team/may/chan_ooh323_evo/main/data.c
    team/may/chan_ooh323_evo/main/features.c
    team/may/chan_ooh323_evo/main/file.c
    team/may/chan_ooh323_evo/main/http.c
    team/may/chan_ooh323_evo/main/image.c
    team/may/chan_ooh323_evo/main/stun.c
    team/may/chan_ooh323_evo/main/taskprocessor.c
    team/may/chan_ooh323_evo/main/timing.c
    team/may/chan_ooh323_evo/main/udptl.c

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 21 15:30:22 2012
@@ -1,1 +1,1 @@
-/trunk:376341-376345,377841
+/trunk:376341-376345,377841,377844-377915

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Dec 21 15:30:22 2012
@@ -1,1 +1,1 @@
-/trunk:1-377812,377841
+/trunk:1-377812,377841,377844-377915

Modified: team/may/chan_ooh323_evo/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/chan_sip.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/channels/chan_sip.c (original)
+++ team/may/chan_ooh323_evo/channels/chan_sip.c Fri Dec 21 15:30:22 2012
@@ -26331,6 +26331,24 @@
 		if (!ast_strlen_zero(referred_by)) {
 			pbx_builtin_setvar_helper(current.chan2, "_SIPTRANSFER_REFERER", referred_by);
 		}
+
+		/* When a call is transferred to voicemail from a Digium phone, there may be
+		 * a Diversion header present in the REFER with an appropriate reason parameter
+		 * set. We need to update the redirecting information appropriately.
+		 */
+		ast_channel_lock(p->owner);
+		sip_pvt_lock(p);
+		ast_party_redirecting_init(&redirecting);
+		memset(&update_redirecting, 0, sizeof(update_redirecting));
+		change_redirecting_information(p, req, &redirecting, &update_redirecting, FALSE);
+
+		/* Do not hold the pvt lock during a call that causes an indicate or an async_goto.
+		 * Those functions lock channels which will invalidate locking order if the pvt lock
+		 * is held.*/
+		sip_pvt_unlock(p);
+		ast_channel_unlock(p->owner);
+		ast_channel_update_redirecting(current.chan2, &redirecting, &update_redirecting);
+		ast_party_redirecting_free(&redirecting);
 	}
 
 	sip_pvt_lock(p);
@@ -26378,20 +26396,7 @@
 	}
 	ast_set_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER);	/* Delay hangup */
 
-	/* When a call is transferred to voicemail from a Digium phone, there may be
-	 * a Diversion header present in the REFER with an appropriate reason parameter
-	 * set. We need to update the redirecting information appropriately.
-	 */
-	ast_party_redirecting_init(&redirecting);
-	memset(&update_redirecting, 0, sizeof(update_redirecting));
-	change_redirecting_information(p, req, &redirecting, &update_redirecting, FALSE);
-
-	/* Do not hold the pvt lock during a call that causes an indicate or an async_goto.
-	 * Those functions lock channels which will invalidate locking order if the pvt lock
-	 * is held.*/
 	sip_pvt_unlock(p);
-	ast_channel_update_redirecting(current.chan2, &redirecting, &update_redirecting);
-	ast_party_redirecting_free(&redirecting);
 
 	/* For blind transfers, move the call to the new extensions. For attended transfers on multiple
 	 * servers - generate an INVITE with Replaces. Either way, let the dial plan decided

Modified: team/may/chan_ooh323_evo/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/configure.ac?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/configure.ac (original)
+++ team/may/chan_ooh323_evo/configure.ac Fri Dec 21 15:30:22 2012
@@ -489,11 +489,12 @@
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
 
-# Any one of these 4 packages support a mandatory requirement, so we want to check on them as early as possible.
+# Any one of these 5 packages support a mandatory requirement, so we want to check on them as early as possible.
 AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
 AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
 AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
 AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
+AST_EXT_LIB_CHECK([UUID], [uuid], [uuid_generate_random], [uuid.h], [-luuid])
 
 EDITLINE_LIB=""
 if test "x$TERMCAP_LIB" != "x" ; then

Modified: team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in (original)
+++ team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in Fri Dec 21 15:30:22 2012
@@ -848,19 +848,19 @@
 /* Define to 1 if you have the `strtoq' function. */
 #undef HAVE_STRTOQ
 
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
 
-/* Define to 1 if `uid' is member of `struct sockpeercred'. */
+/* Define to 1 if `uid' is a member of `struct sockpeercred'. */
 #undef HAVE_STRUCT_SOCKPEERCRED_UID
 
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
-/* Define to 1 if `cr_uid' is member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_CR_UID
 
-/* Define to 1 if `uid' is member of `struct ucred'. */
+/* Define to 1 if `uid' is a member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_UID
 
 /* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1137,6 +1137,9 @@
 
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION

Modified: team/may/chan_ooh323_evo/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/Makefile?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/Makefile (original)
+++ team/may/chan_ooh323_evo/main/Makefile Fri Dec 21 15:30:22 2012
@@ -43,7 +43,7 @@
   ifneq (x$(CAP_LIB),x)
     AST_LIBS+=$(CAP_LIB)
   endif
-  AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv
+  AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv -luuid
 else
   AST_LIBS+=$(EDITLINE_LIB) -lm
 endif

Modified: team/may/chan_ooh323_evo/main/aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/aoc.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/aoc.c (original)
+++ team/may/chan_ooh323_evo/main/aoc.c Fri Dec 21 15:30:22 2012
@@ -1605,7 +1605,12 @@
 	AST_CLI_DEFINE(aoc_cli_debug_enable, "enable cli debugging of AOC messages"),
 };
 
+static void aoc_shutdown(void)
+{
+	ast_cli_unregister_multiple(aoc_cli, ARRAY_LEN(aoc_cli));
+}
 int ast_aoc_cli_init(void)
 {
+	ast_register_atexit(aoc_shutdown);
 	return ast_cli_register_multiple(aoc_cli, ARRAY_LEN(aoc_cli));
 }

Modified: team/may/chan_ooh323_evo/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/asterisk.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/asterisk.c (original)
+++ team/may/chan_ooh323_evo/main/asterisk.c Fri Dec 21 15:30:22 2012
@@ -238,6 +238,7 @@
 #include "asterisk/rtp_engine.h"
 #include "asterisk/format.h"
 #include "asterisk/aoc.h"
+#include "asterisk/uuid.h"
 
 #include "../defaults.h"
 
@@ -4112,6 +4113,7 @@
 	}
 
 	ast_aoc_cli_init();
+	ast_uuid_init();
 
 	ast_makesocket();
 	sigemptyset(&sigs);

Modified: team/may/chan_ooh323_evo/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/cel.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/cel.c (original)
+++ team/may/chan_ooh323_evo/main/cel.c Fri Dec 21 15:30:22 2012
@@ -729,6 +729,7 @@
 		ao2_ref(linkedids, -1);
 		linkedids = NULL;
 	}
+	ast_cli_unregister(&cli_status);
 }
 
 int ast_cel_engine_init(void)

Modified: team/may/chan_ooh323_evo/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/channel.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/channel.c (original)
+++ team/may/chan_ooh323_evo/main/channel.c Fri Dec 21 15:30:22 2012
@@ -8620,9 +8620,11 @@
 static void channels_shutdown(void)
 {
 	ast_data_unregister(NULL);
+	ast_cli_unregister_multiple(cli_channel, ARRAY_LEN(cli_channel));
 	if (channels) {
 		ao2_container_unregister("channels");
 		ao2_ref(channels, -1);
+		channels = NULL;
 	}
 }
 

Modified: team/may/chan_ooh323_evo/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/data.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/data.c (original)
+++ team/may/chan_ooh323_evo/main/data.c Fri Dec 21 15:30:22 2012
@@ -3318,7 +3318,9 @@
 static void data_shutdown(void)
 {
 	ast_manager_unregister("DataGet");
+	ast_cli_unregister_multiple(cli_data, ARRAY_LEN(cli_data));
 	ao2_t_ref(root_data.container, -1, "Unref root_data.container in data_shutdown");
+	root_data.container = NULL;
 	ast_rwlock_destroy(&root_data.lock);
 }
 

Modified: team/may/chan_ooh323_evo/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/features.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/features.c (original)
+++ team/may/chan_ooh323_evo/main/features.c Fri Dec 21 15:30:22 2012
@@ -3581,7 +3581,7 @@
  * \retval -1 on failure.
  */
 static int feature_interpret_helper(struct ast_channel *chan, struct ast_channel *peer,
-	struct ast_bridge_config *config, const char *code, int sense, char *dynamic_features_buf,
+	struct ast_bridge_config *config, const char *code, int sense, const struct ast_str *dynamic_features_buf,
 	struct ast_flags *features, feature_interpret_op operation, struct ast_call_feature *feature)
 {
 	int x;
@@ -3616,6 +3616,10 @@
 				res = AST_FEATURE_RETURN_SUCCESS; /* We found something */
 			} else if (operation == FEATURE_INTERPRET_DO) {
 				res = builtin_features[x].operation(chan, peer, config, code, sense, NULL);
+				ast_test_suite_event_notify("FEATURE_DETECTION",
+						"Result: success\r\n"
+						"Feature: %s",
+						builtin_features[x].sname);
 			}
 			if (feature) {
 				memcpy(feature, &builtin_features[x], sizeof(*feature));
@@ -3628,13 +3632,21 @@
 			}
 		}
 	}
+
+	if (operation == FEATURE_INTERPRET_CHECK && x == FEATURES_COUNT) {
+		ast_test_suite_event_notify("FEATURE_DETECTION",
+				"Result: fail");
+	}
+
 	ast_rwlock_unlock(&features_lock);
 
-	if (ast_strlen_zero(dynamic_features_buf) || feature_detected) {
+	ast_assert(dynamic_features_buf != NULL);
+
+	if (!ast_str_strlen(dynamic_features_buf) || feature_detected) {
 		return res;
 	}
 
-	tmp = dynamic_features_buf;
+	tmp = ast_str_buffer(dynamic_features_buf);
 
 	while ((tok = strsep(&tmp, "#"))) {
 		AST_RWLIST_RDLOCK(&feature_groups);
@@ -3707,10 +3719,12 @@
  */
 static int feature_interpret(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, const char *code, int sense) {
 
-	char dynamic_features_buf[128];
+	struct ast_str *dynamic_features_buf;
 	const char *peer_dynamic_features, *chan_dynamic_features;
 	struct ast_flags features;
 	struct ast_call_feature feature;
+	int res;
+
 	if (sense == FEATURE_SENSE_CHAN) {
 		/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
 		ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
@@ -3728,11 +3742,19 @@
 	chan_dynamic_features = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),""));
 	ast_channel_unlock(chan);
 
-	snprintf(dynamic_features_buf, sizeof(dynamic_features_buf), "%s%s%s", S_OR(chan_dynamic_features, ""), chan_dynamic_features && peer_dynamic_features ? "#" : "", S_OR(peer_dynamic_features,""));
-
-	ast_debug(3, "Feature interpret: chan=%s, peer=%s, code=%s, sense=%d, features=%d, dynamic=%s\n", ast_channel_name(chan), ast_channel_name(peer), code, sense, features.flags, dynamic_features_buf);
-
-	return feature_interpret_helper(chan, peer, config, code, sense, dynamic_features_buf, &features, FEATURE_INTERPRET_DO, &feature);
+	if (!(dynamic_features_buf = ast_str_create(128))) {
+		return AST_FEATURE_RETURN_PASSDIGITS;
+	}
+
+	ast_str_set(&dynamic_features_buf, 0, "%s%s%s", S_OR(chan_dynamic_features, ""), chan_dynamic_features && peer_dynamic_features ? "#" : "", S_OR(peer_dynamic_features,""));
+
+	ast_debug(3, "Feature interpret: chan=%s, peer=%s, code=%s, sense=%d, features=%d, dynamic=%s\n", ast_channel_name(chan), ast_channel_name(peer), code, sense, features.flags, ast_str_buffer(dynamic_features_buf));
+
+	res = feature_interpret_helper(chan, peer, config, code, sense, dynamic_features_buf, &features, FEATURE_INTERPRET_DO, &feature);
+
+	ast_free(dynamic_features_buf);
+
+	return res;
 }
 
 
@@ -3743,12 +3765,21 @@
 
 /*! \brief Check if a feature exists */
 static int feature_check(struct ast_channel *chan, struct ast_flags *features, char *code) {
-	char *chan_dynamic_features;
+	struct ast_str *chan_dynamic_features;
+	int res;
+
+	if (!(chan_dynamic_features = ast_str_create(128))) {
+		return AST_FEATURE_RETURN_PASSDIGITS;
+	}
 	ast_channel_lock(chan);
-	chan_dynamic_features = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),""));
+	ast_str_set(&chan_dynamic_features, 0, "%s", S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),""));
 	ast_channel_unlock(chan);
 
-	return feature_interpret_helper(chan, NULL, NULL, code, 0, chan_dynamic_features, features, FEATURE_INTERPRET_CHECK, NULL);
+	res = feature_interpret_helper(chan, NULL, NULL, code, 0, chan_dynamic_features, features, FEATURE_INTERPRET_CHECK, NULL);
+
+	ast_free(chan_dynamic_features);
+
+	return res;
 }
 
 static void set_config_flags(struct ast_channel *chan, struct ast_bridge_config *config)

Modified: team/may/chan_ooh323_evo/main/file.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/file.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/file.c (original)
+++ team/may/chan_ooh323_evo/main/file.c Fri Dec 21 15:30:22 2012
@@ -1583,8 +1583,14 @@
 	AST_CLI_DEFINE(handle_cli_core_show_file_formats, "Displays file formats")
 };
 
+static void file_shutdown(void)
+{
+	ast_cli_unregister_multiple(cli_file, ARRAY_LEN(cli_file));
+}
+
 int ast_file_init(void)
 {
 	ast_cli_register_multiple(cli_file, ARRAY_LEN(cli_file));
+	ast_register_atexit(file_shutdown);
 	return 0;
 }

Modified: team/may/chan_ooh323_evo/main/http.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/http.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/http.c (original)
+++ team/may/chan_ooh323_evo/main/http.c Fri Dec 21 15:30:22 2012
@@ -1203,11 +1203,17 @@
 	AST_CLI_DEFINE(handle_show_http, "Display HTTP server status"),
 };
 
+static void http_shutdown(void)
+{
+	ast_cli_unregister_multiple(cli_http, ARRAY_LEN(cli_http));
+}
+
 int ast_http_init(void)
 {
 	ast_http_uri_link(&statusuri);
 	ast_http_uri_link(&staticuri);
 	ast_cli_register_multiple(cli_http, ARRAY_LEN(cli_http));
+	ast_register_atexit(http_shutdown);
 
 	return __ast_http_load(0);
 }

Modified: team/may/chan_ooh323_evo/main/image.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/image.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/image.c (original)
+++ team/may/chan_ooh323_evo/main/image.c Fri Dec 21 15:30:22 2012
@@ -206,8 +206,14 @@
 	AST_CLI_DEFINE(handle_core_show_image_formats, "Displays image formats")
 };
 
+static void image_shutdown(void)
+{
+	ast_cli_unregister_multiple(cli_image, ARRAY_LEN(cli_image));
+}
+
 int ast_image_init(void)
 {
 	ast_cli_register_multiple(cli_image, ARRAY_LEN(cli_image));
+	ast_register_atexit(image_shutdown);
 	return 0;
 }

Modified: team/may/chan_ooh323_evo/main/stun.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/stun.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/stun.c (original)
+++ team/may/chan_ooh323_evo/main/stun.c Fri Dec 21 15:30:22 2012
@@ -504,8 +504,14 @@
 	AST_CLI_DEFINE(handle_cli_stun_set_debug, "Enable/Disable STUN debugging"),
 };
 
+static void stun_shutdown(void)
+{
+	ast_cli_unregister_multiple(cli_stun, sizeof(cli_stun) / sizeof(struct ast_cli_entry));
+}
+
 /*! \brief Initialize the STUN system in Asterisk */
 void ast_stun_init(void)
 {
 	ast_cli_register_multiple(cli_stun, sizeof(cli_stun) / sizeof(struct ast_cli_entry));
-}
+	ast_register_atexit(stun_shutdown);
+}

Modified: team/may/chan_ooh323_evo/main/taskprocessor.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/taskprocessor.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/taskprocessor.c (original)
+++ team/may/chan_ooh323_evo/main/taskprocessor.c Fri Dec 21 15:30:22 2012
@@ -122,15 +122,10 @@
 	AST_CLI_DEFINE(cli_tps_report, "List instantiated task processors and statistics"),
 };
 
-/*!
- * \internal
- * \brief Clean up resources on Asterisk shutdown
- */
+/*! \internal \brief Clean up resources on Asterisk shutdown */
 static void tps_shutdown(void)
 {
-	ast_cli_unregister_multiple(taskprocessor_clis, ARRAY_LEN(taskprocessor_clis));
 	ao2_t_ref(tps_singletons, -1, "Unref tps_singletons in shutdown");
-	tps_singletons = NULL;
 }
 
 /* initialize the taskprocessor container and register CLI operations */

Modified: team/may/chan_ooh323_evo/main/timing.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/timing.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/timing.c (original)
+++ team/may/chan_ooh323_evo/main/timing.c Fri Dec 21 15:30:22 2012
@@ -299,11 +299,21 @@
 	AST_CLI_DEFINE(timing_test, "Run a timing test"),
 };
 
+static void timing_shutdown(void)
+{
+	ast_cli_unregister_multiple(cli_timing, ARRAY_LEN(cli_timing));
+
+	ast_heap_destroy(timing_interfaces);
+	timing_interfaces = NULL;
+}
+
 int ast_timing_init(void)
 {
 	if (!(timing_interfaces = ast_heap_create(2, timing_holder_cmp, 0))) {
 		return -1;
 	}
 
+	ast_register_atexit(timing_shutdown);
+
 	return ast_cli_register_multiple(cli_timing, ARRAY_LEN(cli_timing));
 }

Modified: team/may/chan_ooh323_evo/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/udptl.c?view=diff&rev=378193&r1=378192&r2=378193
==============================================================================
--- team/may/chan_ooh323_evo/main/udptl.c (original)
+++ team/may/chan_ooh323_evo/main/udptl.c Fri Dec 21 15:30:22 2012
@@ -1471,9 +1471,13 @@
 	return 0;
 }
 
-/*! \internal \brief Clean up resources on Asterisk shutdown */
+/*!
+ * \internal
+ * \brief Clean up resources on Asterisk shutdown
+ */
 static void udptl_shutdown(void)
 {
+	ast_cli_unregister_multiple(cli_udptl, ARRAY_LEN(cli_udptl));
 	ao2_t_global_obj_release(globals, "Unref udptl global container in shutdown");
 	aco_info_destroy(&cfg_info);
 }
@@ -1509,9 +1513,9 @@
 	aco_option_register_custom(&cfg_info, "t38faxudpec", ACO_EXACT, general_options, NULL, removed_options_handler, 0);
 	aco_option_register_custom(&cfg_info, "t38faxmaxdatagram", ACO_EXACT, general_options, NULL, removed_options_handler, 0);
 
+	__ast_udptl_reload(0);
+
 	ast_cli_register_multiple(cli_udptl, ARRAY_LEN(cli_udptl));
 
-	__ast_udptl_reload(0);
-
 	ast_register_atexit(udptl_shutdown);
 }




More information about the asterisk-commits mailing list