Wireshark-bugs: [Wireshark-bugs] [Bug 6995] Implementing dissector for PCEP extension according
Date: Mon, 26 Mar 2012 22:16:53 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6995

--- Comment #5 from Svetoslav Duhovnikov <duhovnikov@xxxxxxxxx> 2012-03-26 22:16:52 PDT ---
(In reply to comment #3)
> There's too many proto_tree_add_text()'s in here.  Stuff like this:
> 
> +    variance_processing_time = tvb_get_ntohl(tvb, offset2+20);
> +    proto_tree_add_text(pcep_object_tree, tvb, offset2+20, 4, "Variance
> processing time: %u ms^2", variance_processing_time);
> 
> should be rewritten into just a proto_tree_add_item() call (unless of course
> the fetched value needs to be used for other processing--which it isn't in at
> least the quoted case).
> 
> Stuff like this:
> 
> +    if (obj_length < OBJ_HDR_LEN+MONITORING_OBJ_MIN_LEN) {
> +        proto_tree_add_text(pcep_object_tree, tvb, offset2, obj_length,
> +            "Bad MONITORING object length %u, should be >= %u", obj_length,
> +            OBJ_HDR_LEN+MONITORING_OBJ_MIN_LEN);
> 
> should be rewritten into expert info's.
> 
> I could let the latter case slide since the rest of the dissector is written
> like that, but the protocol stuff really should be made filterable.

I will update according to your first comment. Doing this for the first time...
I will read what is "expert info's" and I can also re-write the rest.

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