aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb-mailslot.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-02-10 02:25:14 +0000
committerGuy Harris <guy@alum.mit.edu>2002-02-10 02:25:14 +0000
commitba43ce663f08bf196e3825a46fe84b18fa348fcf (patch)
tree3f0090ccf32c78a08007b956f468b459b2a8d39a /packet-smb-mailslot.c
parente9c58fda325bbdeecececb25a1cc12b3146f455b (diff)
From Ronnie Sahlberg: display the mailslot header items only if we have
a tvbuff with the mailslot header. Fix indentation. svn path=/trunk/; revision=4715
Diffstat (limited to 'packet-smb-mailslot.c')
-rw-r--r--packet-smb-mailslot.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/packet-smb-mailslot.c b/packet-smb-mailslot.c
index f93ff0724a..58fcba4d6b 100644
--- a/packet-smb-mailslot.c
+++ b/packet-smb-mailslot.c
@@ -2,7 +2,7 @@
* Routines for SMB mailslot packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-mailslot.c,v 1.30 2002/01/20 22:12:28 guy Exp $
+ * $Id: packet-smb-mailslot.c,v 1.31 2002/02/10 02:25:14 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -127,19 +127,20 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
if (tri != NULL)
tri->trans_subcmd = trans_subcmd;
}
- } else
+ } else {
trans_subcmd = tri->trans_subcmd;
-
- if (parent_tree) {
- item = proto_tree_add_item(parent_tree, proto_smb_msp, mshdr_tvb,
- 0, -1, FALSE);
- tree = proto_item_add_subtree(item, ett_smb_msp);
}
/* Only do these ones if we have them. For fragmented SMB Transactions
we may only have the setup area for the first fragment
*/
if(mshdr_tvb && setup_tvb){
+ if (parent_tree) {
+ item = proto_tree_add_item(parent_tree, proto_smb_msp,
+ mshdr_tvb, 0, -1, FALSE);
+ tree = proto_item_add_subtree(item, ett_smb_msp);
+ }
+
/* do the opcode field */
opcode = tvb_get_letohs(setup_tvb, offset);
@@ -177,8 +178,8 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
len = tvb_strsize(mshdr_tvb, offset);
proto_tree_add_item(tree, hf_name, mshdr_tvb, offset, len, TRUE);
offset += len;
+ proto_item_set_len(item, offset);
}
- proto_item_set_len(item, offset);
dissected = FALSE;
switch(trans_subcmd){
@@ -245,5 +246,5 @@ proto_register_smb_mailslot(void)
void
proto_reg_handoff_smb_mailslot(void)
{
- data_handle = find_dissector("data");
+ data_handle = find_dissector("data");
}