From 9be45b2369666607980451d0c85b6fc62d529189 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Thu, 7 Mar 2019 22:20:34 +0100 Subject: Use the ndo->ndo_protocol field instead of the protoname parameter Moreover: Fix a truncated string: "[!" is not the prefix for a truncated string. Add two comments. Clean up a whitespace. --- print-tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'print-tcp.c') diff --git a/print-tcp.c b/print-tcp.c index 55bff766..66834e84 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -709,7 +709,8 @@ tcp_print(netdissect_options *ndo, smtp_print(ndo, bp, length); } else if (IS_SRC_OR_DST_PORT(WHOIS_PORT)) { ND_PRINT(": "); - txtproto_print(ndo, bp, length, "whois", NULL, 0); /* RFC 3912 */ + ndo->ndo_protocol = "whois"; /* needed by txtproto_print() */ + txtproto_print(ndo, bp, length, NULL, 0); /* RFC 3912 */ } else if (IS_SRC_OR_DST_PORT(BGP_PORT)) bgp_print(ndo, bp, length); else if (IS_SRC_OR_DST_PORT(PPTP_PORT)) @@ -832,7 +833,7 @@ print_tcp_rst_data(netdissect_options *ndo, c = EXTRACT_U_1(sp); sp++; fn_print_char(ndo, c); - length--; + length--; } ND_PRINT("]"); } -- cgit v1.2.1