Commit fe54e374 authored by Libor Peltan's avatar Libor Peltan

log: force adding trailing dot to dname in log

This is a fix of #498 a slightly ugly way:
we don't change the original ascii-formatted dname,
rather modify the log routine to check-add the trailing dot.
parent 0209498d
......@@ -317,8 +317,9 @@ static void log_msg_text(int level, log_source_t src, const char *zone,
size_t zone_len = 0;
if (zone != NULL) {
zone_len = strlen(zone);
const char *trailing_dot = zone[zone_len - 1] == '.' ? "" : ".";
int ret = log_msg_add(&write, &capacity, "[%.*s] ", zone_len, zone);
int ret = log_msg_add(&write, &capacity, "[%.*s%s] ", zone_len, zone, trailing_dot);
if (ret != KNOT_EOK) {
rcu_read_unlock();
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment