diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-01-07 00:57:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-01-07 00:57:46 +0000 |
commit | 56a9c7ba63e254dab663fb2b1ee2264044c7f7d4 (patch) | |
tree | 28061a1e449767daf26a4c12dd0f46d9794b0f20 /packet-nbns.c | |
parent | 5571f3e40b568dc4c45422068c3ef29c50edae2d (diff) | |
download | wireshark-56a9c7ba63e254dab663fb2b1ee2264044c7f7d4.tar.gz |
Shuffle a comment, and clean up white space.
svn path=/trunk/; revision=4490
Diffstat (limited to 'packet-nbns.c')
-rw-r--r-- | packet-nbns.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/packet-nbns.c b/packet-nbns.c index b960a46715..7f19b6c7be 100644 --- a/packet-nbns.c +++ b/packet-nbns.c @@ -3,7 +3,7 @@ * to when it had only NBNS) * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-nbns.c,v 1.68 2002/01/07 00:16:32 guy Exp $ + * $Id: packet-nbns.c,v 1.69 2002/01/07 00:57:46 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1497,6 +1497,8 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo, if (reported_len > length) reported_len = length; + next_tvb = tvb_new_subset(tvb, offset, len, reported_len); + /* * Catch the ReportedBoundsError exception; if this * particular message happens to get a ReportedBoundsError @@ -1507,22 +1509,21 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo, * If it gets a BoundsError, we can stop, as there's nothing * more to see, so we just re-throw it. */ - next_tvb = tvb_new_subset(tvb, offset, len, reported_len); - saved_proto = pinfo->current_proto; - TRY { + saved_proto = pinfo->current_proto; + TRY { dissect_netbios_payload(next_tvb, pinfo, tree); - } - CATCH(BoundsError) { - RETHROW; - } - CATCH(ReportedBoundsError) { + } + CATCH(BoundsError) { + RETHROW; + } + CATCH(ReportedBoundsError) { if (check_col(pinfo->cinfo, COL_INFO)) col_append_str(pinfo->cinfo, COL_INFO, "[Malformed Packet]"); proto_tree_add_protocol_format(tree, proto_malformed, tvb, 0, 0, "[Malformed Packet: %s]", pinfo->current_proto ); pinfo->current_proto = saved_proto; - } - ENDTRY; + } + ENDTRY; break; } |