diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-02-10 02:25:14 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-02-10 02:25:14 +0000 |
commit | 4503d59394bfc46221e48b2ee762e35c1d080592 (patch) | |
tree | 3f0090ccf32c78a08007b956f468b459b2a8d39a /packet-smb-mailslot.c | |
parent | a51644c19636c3a9ceefd40b3e434e2866987b4e (diff) |
From Ronnie Sahlberg: display the mailslot header items only if we have
a tvbuff with the mailslot header.
Fix indentation.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4715 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-smb-mailslot.c')
-rw-r--r-- | packet-smb-mailslot.c | 19 |
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"); } |