Wireshark-bugs: [Wireshark-bugs] [Bug 5270] diff for a new dissector for COAP (draft-ietf-core-c

Date: Tue, 26 Jul 2011 07:02:14 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5270

--- Comment #50 from Shoichi Sakane <wireshark-shoichi@xxxxxxxx> 2011-07-26 07:02:11 PDT ---
Thanks for your review.

I will fix the two of bottoms.
Do I have to revive a switch-case rather a function table ?

Shoichi

(In reply to comment #49)
> (In reply to comment #48)
> > - improved the option handler.
> 
> I prefer when there is a switch with case (more readable) 
> 
> otherwise
> There is 2 errors with checkhf 
> ERROR: NO ARRAY: epan/dissectors/packet-coap.c, hf_coap_opt_block2
> ERROR: NO ARRAY: epan/dissectors/packet-coap.c, hf_coap_opt_block1
> 
> 
> +static void
> +dissect_coap_opt_port(tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree,
> gint offset, gint opt_length, int hfindex)
> +{
> +    proto_item *item = NULL;
> +
> +    if (opt_length > 2) {
> +        proto_tree_add_text(subtree, tvb, 0, 0, "Invalid length: %d",
> opt_length);
> +        return;
> +    }
> 
> Why not use expert_info to display this error ?

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.