aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smtp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-07-14 08:27:34 +0000
committerGuy Harris <guy@alum.mit.edu>2002-07-14 08:27:34 +0000
commit9d1fdfedb76e9706a5729ee78a62c0c5871684d6 (patch)
tree86bfefdd27ded2d6f3e1bca3244d1f0ad08bca5e /packet-smtp.c
parentc5a0e76a76625990f69dabce77d650f7f08d7fd2 (diff)
downloadwireshark-9d1fdfedb76e9706a5729ee78a62c0c5871684d6.tar.gz
wireshark-9d1fdfedb76e9706a5729ee78a62c0c5871684d6.tar.bz2
wireshark-9d1fdfedb76e9706a5729ee78a62c0c5871684d6.zip
Only put "smtp.req" into the tree for packets that contain request
lines, and only put "smtp.rsp" into the tree for packets that contain reply lines; don't put either into the tree for packets that contain only message body text or an EOM. svn path=/trunk/; revision=5866
Diffstat (limited to 'packet-smtp.c')
-rw-r--r--packet-smtp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/packet-smtp.c b/packet-smtp.c
index 8cd9234a10..3348800ee3 100644
--- a/packet-smtp.c
+++ b/packet-smtp.c
@@ -1,7 +1,7 @@
/* packet-smtp.c
* Routines for SMTP packet disassembly
*
- * $Id: packet-smtp.c,v 1.27 2002/07/14 00:40:07 guy Exp $
+ * $Id: packet-smtp.c,v 1.28 2002/07/14 08:27:34 guy Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -359,8 +359,6 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_smtp, tvb, offset, -1, FALSE);
smtp_tree = proto_item_add_subtree(ti, ett_smtp);
- proto_tree_add_boolean_hidden(smtp_tree, (request ? hf_smtp_req : hf_smtp_rsp),
- tvb, offset, 4, TRUE);
if (request) {
/*
@@ -436,6 +434,8 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cmdlen = 4;
else
cmdlen = linelen;
+ proto_tree_add_boolean_hidden(smtp_tree, hf_smtp_req, tvb,
+ 0, 0, TRUE);
proto_tree_add_item(smtp_tree, hf_smtp_req_command, tvb,
offset, cmdlen, FALSE);
if (linelen > 5) {
@@ -452,6 +452,8 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Process the response, a line at a time, until we hit a line
* that doesn't have a continuation indication on it.
*/
+ proto_tree_add_boolean_hidden(smtp_tree, hf_smtp_rsp, tvb,
+ 0, 0, TRUE);
while (tvb_offset_exists(tvb, offset)) {