#ifdef LINUX
#include "execinfo.h"
#define EXECINFO GNUNET_NO
+#define MAX_TRACE_DEPTH 50
#endif
#define DEBUG_TASKS GNUNET_NO
{
struct Task *t;
#if EXECINFO
- void *backtrace_array[50];
+ void *backtrace_array[MAX_TRACE_DEPTH];
#endif
+
+ GNUNET_assert (NULL != task);
t = GNUNET_malloc (sizeof (struct Task));
t->callback = task;
t->callback_cls = task_cls;
#if EXECINFO
- t->num_backtrace_strings = backtrace(backtrace_array, 50);
+ t->num_backtrace_strings = backtrace(backtrace_array, MAX_TRACE_DEPTH);
t->backtrace_strings = backtrace_symbols(backtrace_array, t->num_backtrace_strings);
#endif
if (rs != NULL)