Adjust log callback type to use log_domain_mask_t

This commit is contained in:
Nick Mathewson 2019-07-08 14:11:02 -04:00
parent 4512578e49
commit 2e55fa9587
6 changed files with 8 additions and 6 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -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)) {