[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Adjust log callback type to use log_domain_mask_t
commit 2e55fa9587ffd8e988229fe127881289d9271c32
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Jul 8 14:11:02 2019 -0400
Adjust log callback type to use log_domain_mask_t
---
src/feature/control/control_events.c | 2 +-
src/feature/control/control_events.h | 3 ++-
src/lib/log/log.h | 3 ++-
src/test/test_logging.c | 2 +-
src/test/test_options.c | 2 +-
src/test/testing_common.c | 2 +-
6 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/feature/control/control_events.c b/src/feature/control/control_events.c
index e596a8aee..9e0966ca5 100644
--- a/src/feature/control/control_events.c
+++ b/src/feature/control/control_events.c
@@ -1287,7 +1287,7 @@ enable_control_logging(void)
/** We got a log message: tell any interested control connections. */
void
-control_event_logmsg(int severity, uint32_t domain, const char *msg)
+control_event_logmsg(int severity, log_domain_mask_t domain, const char *msg)
{
int event;
diff --git a/src/feature/control/control_events.h b/src/feature/control/control_events.h
index 0bdbb9cfd..34986fdb8 100644
--- a/src/feature/control/control_events.h
+++ b/src/feature/control/control_events.h
@@ -128,7 +128,8 @@ int control_event_circ_bandwidth_used_for_circ(origin_circuit_t *ocirc);
int control_event_conn_bandwidth(connection_t *conn);
int control_event_conn_bandwidth_used(void);
int control_event_circuit_cell_stats(void);
-void control_event_logmsg(int severity, uint32_t domain, const char *msg);
+void control_event_logmsg(int severity, log_domain_mask_t domain,
+ const char *msg);
void control_event_logmsg_pending(void);
int control_event_descriptors_changed(smartlist_t *routers);
int control_event_address_mapped(const char *from, const char *to,
diff --git a/src/lib/log/log.h b/src/lib/log/log.h
index 88e4ad8d6..301c7d571 100644
--- a/src/lib/log/log.h
+++ b/src/lib/log/log.h
@@ -144,7 +144,8 @@ typedef struct log_severity_list_t {
} log_severity_list_t;
/** Callback type used for add_callback_log. */
-typedef void (*log_callback)(int severity, uint32_t domain, const char *msg);
+typedef void (*log_callback)(int severity, log_domain_mask_t domain,
+ const char *msg);
void init_logging(int disable_startup_queue);
int parse_log_level(const char *level);
diff --git a/src/test/test_logging.c b/src/test/test_logging.c
index 6416e98a4..bb7018fe1 100644
--- a/src/test/test_logging.c
+++ b/src/test/test_logging.c
@@ -15,7 +15,7 @@
#endif
static void
-dummy_cb_fn(int severity, uint32_t domain, const char *msg)
+dummy_cb_fn(int severity, log_domain_mask_t domain, const char *msg)
{
(void)severity; (void)domain; (void)msg;
}
diff --git a/src/test/test_options.c b/src/test/test_options.c
index 396be6b18..d2f0c1121 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -38,7 +38,7 @@ typedef struct {
static smartlist_t *messages = NULL;
static void
-log_cback(int severity, uint32_t domain, const char *msg)
+log_cback(int severity, log_domain_mask_t domain, const char *msg)
{
logmsg_t *x = tor_malloc(sizeof(*x));
x->severity = severity;
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index 1c2a2e896..ad22898ce 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -243,7 +243,7 @@ tinytest_postfork(void)
}
static void
-log_callback_failure(int severity, uint32_t domain, const char *msg)
+log_callback_failure(int severity, log_domain_mask_t domain, const char *msg)
{
(void)msg;
if (severity == LOG_ERR || (domain & LD_BUG)) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits