diff options
author | t3sserakt <t3ss@posteo.de> | 2017-11-25 18:03:03 +0100 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2017-11-25 18:03:03 +0100 |
commit | 1522bb78401dd739299cc507e7237df32f239a3f (patch) | |
tree | 21705ea0a87475d6b3f88996c169714b5eaeacad /src/util/service.c | |
parent | 4341c875c334f74b767fdbfa01ad1b0160df3f72 (diff) | |
download | gnunet-1522bb78401dd739299cc507e7237df32f239a3f.tar.gz gnunet-1522bb78401dd739299cc507e7237df32f239a3f.zip |
tried to print out stacktrace, not working. removed.
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/src/util/service.c b/src/util/service.c index b4eb33caa..c204f1f87 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -36,6 +36,30 @@ | |||
36 | #include "gauger.h" | 36 | #include "gauger.h" |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | //#if HAVE_EXECINFO_H | ||
40 | //#include "execinfo.h" | ||
41 | |||
42 | ///** | ||
43 | // * Use lsof to generate file descriptor reports on select error? | ||
44 | // * (turn off for stable releases). | ||
45 | // */ | ||
46 | //#define USE_LSOF GNUNET_NO | ||
47 | |||
48 | ///** | ||
49 | // * Obtain trace information for all scheduler calls that schedule tasks. | ||
50 | // */ | ||
51 | //#define EXECINFO GNUNET_NO | ||
52 | |||
53 | ///** | ||
54 | // * Check each file descriptor before adding | ||
55 | // */ | ||
56 | //#define DEBUG_FDS GNUNET_NO | ||
57 | |||
58 | ///** | ||
59 | // * Depth of the traces collected via EXECINFO. | ||
60 | // */ | ||
61 | //#define MAX_TRACE_DEPTH 50 | ||
62 | //#endif | ||
39 | 63 | ||
40 | #define LOG(kind,...) GNUNET_log_from (kind, "util-service", __VA_ARGS__) | 64 | #define LOG(kind,...) GNUNET_log_from (kind, "util-service", __VA_ARGS__) |
41 | 65 | ||
@@ -2529,18 +2553,18 @@ GNUNET_SERVICE_client_drop (struct GNUNET_SERVICE_Client *c) | |||
2529 | c, | 2553 | c, |
2530 | c->mq); | 2554 | c->mq); |
2531 | 2555 | ||
2532 | #if EXECINFO | 2556 | //#if EXECINFO |
2533 | void *backtrace_array[MAX_TRACE_DEPTH]; | 2557 | // void *backtrace_array[MAX_TRACE_DEPTH]; |
2534 | int num_backtrace_strings = backtrace (backtrace_array, MAX_TRACE_DEPTH); | 2558 | // int num_backtrace_strings = backtrace (backtrace_array, MAX_TRACE_DEPTH); |
2535 | char **backtrace_strings = | 2559 | // char **backtrace_strings = |
2536 | backtrace_symbols (backtrace_array, | 2560 | // backtrace_symbols (backtrace_array, |
2537 | t->num_backtrace_strings); | 2561 | // t->num_backtrace_strings); |
2538 | for (unsigned int i = 0; i < num_backtrace_strings; i++) | 2562 | // for (unsigned int i = 0; i < num_backtrace_strings; i++) |
2539 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2563 | // LOG (GNUNET_ERROR_TYPE_DEBUG, |
2540 | "client drop trace %u: %s\n", | 2564 | // "client drop trace %u: %s\n", |
2541 | i, | 2565 | // i, |
2542 | backtrace_strings[i]); | 2566 | // backtrace_strings[i]); |
2543 | #endif | 2567 | //#endif |
2544 | 2568 | ||
2545 | if (NULL != c->drop_task) | 2569 | if (NULL != c->drop_task) |
2546 | { | 2570 | { |