aboutsummaryrefslogtreecommitdiff
path: root/src/lib/err
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-07-19 10:17:22 -0400
committerNick Mathewson <nickm@torproject.org>2019-07-19 10:17:22 -0400
commit5fb070a14da4802f11e84ed83143668502a227c4 (patch)
tree59af413736d2c4c802e43d2654e5aeecb2f87e72 /src/lib/err
parentf682de609b456ccfdb19aef1a1afa8c0873ceb51 (diff)
downloadtor-5fb070a14da4802f11e84ed83143668502a227c4.tar.gz
tor-5fb070a14da4802f11e84ed83143668502a227c4.zip
Extract the log_domain_t type to a lower-level header
This way, both err and log may depend on it.
Diffstat (limited to 'src/lib/err')
-rw-r--r--src/lib/err/.may_include3
-rw-r--r--src/lib/err/backtrace.c4
-rw-r--r--src/lib/err/backtrace.h6
3 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/err/.may_include b/src/lib/err/.may_include
index daa1b6e4ca..314424545e 100644
--- a/src/lib/err/.may_include
+++ b/src/lib/err/.may_include
@@ -1,5 +1,6 @@
orconfig.h
lib/cc/*.h
+lib/defs/*.h
lib/err/*.h
lib/subsys/*.h
-lib/version/*.h \ No newline at end of file
+lib/version/*.h
diff --git a/src/lib/err/backtrace.c b/src/lib/err/backtrace.c
index f5fa7ec299..e6cbe3d326 100644
--- a/src/lib/err/backtrace.c
+++ b/src/lib/err/backtrace.c
@@ -115,7 +115,7 @@ clean_backtrace(void **stack, size_t depth, const ucontext_t *ctx)
* that with a backtrace log. Send messages via the tor_log function at
* logger". */
void
-log_backtrace_impl(int severity, uint64_t domain, const char *msg,
+log_backtrace_impl(int severity, log_domain_mask_t domain, const char *msg,
tor_log_fn logger)
{
size_t depth;
@@ -240,7 +240,7 @@ remove_bt_handler(void)
#ifdef NO_BACKTRACE_IMPL
void
-log_backtrace_impl(int severity, uint64_t domain, const char *msg,
+log_backtrace_impl(int severity, log_domain_mask_t domain, const char *msg,
tor_log_fn logger)
{
logger(severity, domain, "%s. (Stack trace not available)", msg);
diff --git a/src/lib/err/backtrace.h b/src/lib/err/backtrace.h
index ba3049ed15..dcd22cfef2 100644
--- a/src/lib/err/backtrace.h
+++ b/src/lib/err/backtrace.h
@@ -13,11 +13,13 @@
#include "orconfig.h"
#include "lib/cc/compat_compiler.h"
#include "lib/cc/torint.h"
+#include "lib/defs/logging_types.h"
-typedef void (*tor_log_fn)(int, uint64_t, const char *fmt, ...)
+typedef void (*tor_log_fn)(int, log_domain_mask_t, const char *fmt, ...)
CHECK_PRINTF(3,4);
-void log_backtrace_impl(int severity, uint64_t domain, const char *msg,
+void log_backtrace_impl(int severity, log_domain_mask_t domain,
+ const char *msg,
tor_log_fn logger);
int configure_backtrace_handler(const char *tor_version);
void clean_up_backtrace_handler(void);