From: W.C.A. Wijngaards Date: Fri, 28 Feb 2020 07:36:44 +0000 (+0100) Subject: dnstap debug tool, document string change more clearly. X-Git-Tag: release-1.11.0~120^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85c4e5883189f96e549113ae579d0f671b6799a5;p=thirdparty%2Funbound.git dnstap debug tool, document string change more clearly. --- diff --git a/dnstap/unbound-dnstap-socket.c b/dnstap/unbound-dnstap-socket.c index 0605d4d7c..f7974f319 100644 --- a/dnstap/unbound-dnstap-socket.c +++ b/dnstap/unbound-dnstap-socket.c @@ -474,8 +474,11 @@ static char* q_of_msg(ProtobufCBinaryData message) if(sldns_wire2str_rrquestion_buf(message.data+12, message.len-12, buf, sizeof(buf)) != 0) { /* remove trailing newline, tabs to spaces */ + /* remove the newline: */ if(buf[0] != 0) buf[strlen(buf)-1]=0; + /* remove first tab (before type) */ if(strrchr(buf, '\t')) *strrchr(buf, '\t')=' '; + /* remove second tab (before class) */ if(strrchr(buf, '\t')) *strrchr(buf, '\t')=' '; return strdup(buf); }