From: Miroslav Lichvar Date: Tue, 19 Jul 2016 13:37:23 +0000 (+0200) Subject: client: indicate truncated addresses/hostnames X-Git-Tag: 3.0-pre1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dec266dd5f194d80b84df64f7e3ed2e381dd2db;p=thirdparty%2Fchrony.git client: indicate truncated addresses/hostnames Add symbol > to the end of the resolved hostname or address when it's truncated. --- diff --git a/client.c b/client.c index e974062c..8021f6a6 100644 --- a/client.c +++ b/client.c @@ -1885,8 +1885,11 @@ format_name(char *buf, int size, int trunc_dns, int ref, uint32_t ref_id, snprintf(buf, size, "%s", UTI_IPToString(ip_addr)); } else { DNS_IPAddress2Name(ip_addr, buf, size); - if (size > trunc_dns) + if (size > trunc_dns) { + if (trunc_dns > 0) + buf[trunc_dns - 1] = '>'; buf[trunc_dns] = '\0'; + } } }