]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
dnstap debug tool, document string change more clearly.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 28 Feb 2020 07:36:44 +0000 (08:36 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 28 Feb 2020 07:36:44 +0000 (08:36 +0100)
dnstap/unbound-dnstap-socket.c

index 0605d4d7c7606a3b05dfd92f26c6280803b41fd0..f7974f319311a5a8650687a0c4118668037bd664 100644 (file)
@@ -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);
        }