[asterisk-commits] file: branch file/cdrbatchretry r38308 - in /team/file/cdrbatchretry: ./ chan...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jul 26 19:30:36 MST 2006


Author: file
Date: Wed Jul 26 21:30:35 2006
New Revision: 38308

URL: http://svn.digium.com/view/asterisk?rev=38308&view=rev
Log:
Merged revisions 38286,38291 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r38286 | russell | 2006-07-26 21:49:57 -0400 (Wed, 26 Jul 2006) | 3 lines

fix crashes with MALLOC_DEBUG enabled that were a result of my recent thread
storage changes (fixes issue #7595)

................
r38291 | russell | 2006-07-26 22:00:20 -0400 (Wed, 26 Jul 2006) | 11 lines

Merged revisions 38288 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38288 | russell | 2006-07-26 21:58:41 -0400 (Wed, 26 Jul 2006) | 3 lines

fix a crash when MALLOC_DEBUG is enabled and the regexten is enabled. The crash
would occur when the extension got removed. (fixes issue #7484)

........

................

Modified:
    team/file/cdrbatchretry/   (props changed)
    team/file/cdrbatchretry/channel.c
    team/file/cdrbatchretry/channels/chan_sip.c
    team/file/cdrbatchretry/cli.c
    team/file/cdrbatchretry/utils.c

Propchange: team/file/cdrbatchretry/
------------------------------------------------------------------------------
    automerge = gimmearootbeer

Propchange: team/file/cdrbatchretry/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/file/cdrbatchretry/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/file/cdrbatchretry/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul 26 21:30:35 2006
@@ -1,1 +1,1 @@
-/trunk:1-38284
+/trunk:1-38307

Modified: team/file/cdrbatchretry/channel.c
URL: http://svn.digium.com/view/asterisk/team/file/cdrbatchretry/channel.c?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- team/file/cdrbatchretry/channel.c (original)
+++ team/file/cdrbatchretry/channel.c Wed Jul 26 21:30:35 2006
@@ -160,6 +160,14 @@
 	{ AST_CAUSE_INTERWORKING, "INTERWORKING", "Interworking, unspecified" },
 };
 
+#ifdef __AST_DEBUG_MALLOC
+static void FREE(void *ptr)
+{
+	free(ptr);
+}
+#else
+#define FREE free
+#endif
 
 struct ast_variable *ast_channeltype_list(void)
 {
@@ -487,7 +495,7 @@
 
 static void state2str_buf_key_create(void)
 {
-	pthread_key_create(&state2str_buf_key, free);
+	pthread_key_create(&state2str_buf_key, FREE);
 }
  
 /*! \brief Gives the string form of a given channel state */

Modified: team/file/cdrbatchretry/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/file/cdrbatchretry/channels/chan_sip.c?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- team/file/cdrbatchretry/channels/chan_sip.c (original)
+++ team/file/cdrbatchretry/channels/chan_sip.c Wed Jul 26 21:30:35 2006
@@ -1537,6 +1537,15 @@
 	set_udptl_peer: sip_set_udptl_peer,
 };
 
+#ifdef __AST_DEBUG_MALLOC
+static void FREE(void *ptr)
+{
+	free(ptr);
+}
+#else
+#define FREE free
+#endif
+
 /*! \brief Convert transfer status to string */
 static char *referstatus2str(enum referstatus rstatus)
 {
@@ -2243,7 +2252,7 @@
 		}
 		if (onoff)
 			ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
-				 ast_strdup(peer->name), free, "SIP");
+				 ast_strdup(peer->name), FREE, "SIP");
 		else
 			ast_context_remove_extension(context, ext, 1, NULL);
 	}

Modified: team/file/cdrbatchretry/cli.c
URL: http://svn.digium.com/view/asterisk/team/file/cdrbatchretry/cli.c?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- team/file/cdrbatchretry/cli.c (original)
+++ team/file/cdrbatchretry/cli.c Wed Jul 26 21:30:35 2006
@@ -57,9 +57,18 @@
 /*! \brief Initial buffer size for resulting strings in ast_cli() */
 #define AST_CLI_MAXSTRLEN   256
 
+#ifdef __AST_DEBUG_MALLOC
+static void FREE(void *ptr)
+{
+	free(ptr);
+}
+#else
+#define FREE free
+#endif
+
 static void ast_cli_buf_key_create(void)
 {
-	pthread_key_create(&ast_cli_buf_key, free);
+	pthread_key_create(&ast_cli_buf_key, FREE);
 }
 
 void ast_cli(int fd, char *fmt, ...)

Modified: team/file/cdrbatchretry/utils.c
URL: http://svn.digium.com/view/asterisk/team/file/cdrbatchretry/utils.c?rev=38308&r1=38307&r2=38308&view=diff
==============================================================================
--- team/file/cdrbatchretry/utils.c (original)
+++ team/file/cdrbatchretry/utils.c Wed Jul 26 21:30:35 2006
@@ -64,6 +64,15 @@
 
 static pthread_key_t inet_ntoa_buf_key;
 static pthread_once_t inet_ntoa_buf_once = PTHREAD_ONCE_INIT;
+
+#ifdef __AST_DEBUG_MALLOC
+static void FREE(void *ptr)
+{
+	free(ptr);
+}
+#else
+#define FREE free
+#endif
 
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__)
 
@@ -488,7 +497,7 @@
 
 static void inet_ntoa_buf_key_create(void)
 {
-	pthread_key_create(&inet_ntoa_buf_key, free);
+	pthread_key_create(&inet_ntoa_buf_key, FREE);
 }
 
 /*! \brief  ast_inet_ntoa: Recursive thread safe replacement of inet_ntoa */



More information about the asterisk-commits mailing list