{ 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)
{
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 */
/*! \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, ...)
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__)
#define ERANGE 34 /*!< duh? ERANGE value copied from web... */
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 */