diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-19 13:07:45 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-27 01:16:14 +0100 |
commit | 13ae9e9a93a1c02fad9475002c0391b86b7ad7bb (patch) | |
tree | a9575d3582c4f40e051c93ae18dded03fdddc432 /toxdns/toxdns.c | |
parent | 1f25fc0ae417bfc47dea4966cb5e43689aa88d5c (diff) |
Move logging to a callback.
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
Diffstat (limited to 'toxdns/toxdns.c')
-rw-r--r-- | toxdns/toxdns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toxdns/toxdns.c b/toxdns/toxdns.c index a435eee5..7b07fa16 100644 --- a/toxdns/toxdns.c +++ b/toxdns/toxdns.c | |||
@@ -144,7 +144,8 @@ int tox_generate_dns3_string(void *dns3_object, uint8_t *string, uint16_t string | |||
144 | } | 144 | } |
145 | 145 | ||
146 | if (end_len != string - old_str) { | 146 | if (end_len != string - old_str) { |
147 | LOGGER_ERROR("tox_generate_dns3_string Fail, %u != %lu\n", end_len, string - old_str); | 147 | // FIXME: This currently has no access to a logger. |
148 | LOGGER_ERROR(NULL, "tox_generate_dns3_string Fail, %u != %lu\n", end_len, string - old_str); | ||
148 | return -1; | 149 | return -1; |
149 | } | 150 | } |
150 | 151 | ||