mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 14:44:28 +00:00
A possibly "horrible fix" for a "horribly broken"
situation. As stuff shifts around in the asterisk code, the miscellaneous inclusions from the standalone stuff gets broken. There's no easy fix for this situation. I made sure that everything in utils builds without problem ***AND*** that aelparse runs the regressions correctly with the following make menuselect options both on and off: DONT_OPTIMIZE DEBUG_THREADS DEBUG_CHANNEL_LOCKS MALLOC_DEBUG MTX_PROFILE DEBUG_SCHEDULER DEBUG_THREADLOCALS DETECT_DEADLOCKS CHANNEL_TRACE I think from now on, I'm going to #undef all these features in the various utils native files; I guess I could do the same for the copied-in files, surrounded by STANDALONE ifdef. A standalone isn't going to care about threads, mutexes, etc. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -34,6 +34,23 @@ enum ast_lock_type {
|
||||
AST_WRLOCK,
|
||||
};
|
||||
#endif
|
||||
#ifdef DEBUG_THREADLOCALS
|
||||
#define MALLOC_FAILURE_MSG \
|
||||
ast_log(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file);
|
||||
|
||||
void * attribute_malloc _ast_calloc(size_t num, size_t len, const char *file, int lineno, const char *func);
|
||||
|
||||
void * attribute_malloc _ast_calloc(size_t num, size_t len, const char *file, int lineno, const char *func)
|
||||
{
|
||||
void *p;
|
||||
|
||||
if (!(p = calloc(num, len)))
|
||||
MALLOC_FAILURE_MSG;
|
||||
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(LOW_MEMORY)
|
||||
#ifdef HAVE_BKTR
|
||||
void ast_store_lock_info(enum ast_lock_type type, const char *filename,
|
||||
|
Reference in New Issue
Block a user