[asterisk-commits] tilghman: trunk r204118 - in /trunk: include/asterisk/channel.h main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 29 12:56:32 CDT 2009


Author: tilghman
Date: Mon Jun 29 12:56:29 2009
New Revision: 204118

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204118
Log:
Allow trunk to once again compile under MALLOC_DEBUG

Modified:
    trunk/include/asterisk/channel.h
    trunk/main/channel.c

Modified: trunk/include/asterisk/channel.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=204118&r1=204117&r2=204118
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Mon Jun 29 12:56:29 2009
@@ -940,7 +940,12 @@
  *       that can then be populated with data for use in variable
  *       substitution when a real channel does not exist.
  */
+#if defined(REF_DEBUG) || defined(__AST_DEBUG_MALLOC)
+#define ast_dummy_channel_alloc()	__ast_dummy_channel_alloc(__FILE__, __LINE__, __PRETTY_FUNCTION__)
+struct ast_channel *__ast_dummy_channel_alloc(const char *file, int line, const char *function);
+#else
 struct ast_channel *ast_dummy_channel_alloc(void);
+#endif
 
 /*!
  * \brief Queue one or more frames to a channel's frame queue

Modified: trunk/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/channel.c?view=diff&rev=204118&r1=204117&r2=204118
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon Jun 29 12:56:29 2009
@@ -1021,17 +1021,21 @@
 
 /* only do the minimum amount of work needed here to make a channel
  * structure that can be used to expand channel vars */
+#if defined(REF_DEBUG) || defined(__AST_DEBUG_MALLOC)
+struct ast_channel *__ast_dummy_channel_alloc(const char *file, int line, const char *function)
+#else
 struct ast_channel *ast_dummy_channel_alloc(void)
+#endif
 {
 	struct ast_channel *tmp;
 	struct varshead *headp;
 
 #if defined(REF_DEBUG)
-	if (!(tmp = __ao2_alloc_debug(sizeof(*tmp), ast_dummy_channel_destructor, "", file, line, function, 1))) {
+	if (!(tmp = __ao2_alloc_debug(sizeof(*tmp), ast_dummy_channel_destructor, "dummy channel", file, line, function, 1))) {
 		return NULL;
 	}
 #elif defined(__AST_DEBUG_MALLOC)
-	if (!(tmp = __ao2_alloc_debug(sizeof(*tmp), ast_dummy_channel_destructor, "", file, line, function, 0))) {
+	if (!(tmp = __ao2_alloc_debug(sizeof(*tmp), ast_dummy_channel_destructor, "dummy channel", file, line, function, 0))) {
 		return NULL;
 	}
 #else




More information about the asterisk-commits mailing list