aboutsummaryrefslogtreecommitdiff
path: root/src/common/torlog.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-11-19 22:22:43 -0500
committerNick Mathewson <nickm@torproject.org>2010-11-19 22:22:43 -0500
commit6199ac5fbec7f8a862440a8b65f7f299de4c2dbf (patch)
tree4bbb1629fde78b71981ec4205e65927023b3efea /src/common/torlog.h
parenta33b338c5bf5e40037f465c0257a70dedb095e82 (diff)
downloadtor-6199ac5fbec7f8a862440a8b65f7f299de4c2dbf.tar
tor-6199ac5fbec7f8a862440a8b65f7f299de4c2dbf.tar.gz
Do not send Libevent log messages to a controller.
Doing so could make Libevent call Libevent from inside a Libevent logging call, which is a recipe for reentrant confusion and hard-to-debug crashes. This would especially hurt if Libevent debug-level logging is enabled AND the user has a controller watching for low-severity log messages. Fix bug 2190; fix on 0.1.0.2-rc.
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r--src/common/torlog.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h
index 21219569e..8b6cd1bf0 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -95,6 +95,10 @@
/** Number of logging domains in the code. */
#define N_LOGGING_DOMAINS 20
+/** This log message is not safe to send to a callback-based logger.
+ * Used as a flag, not a log domain. */
+#define LD_NOCB (1u<<31)
+
typedef uint32_t log_domain_mask_t;
/** Configures which severities are logged for each logging domain for a given