Wireshark-bugs: [Wireshark-bugs] [Bug 9424] Implement ZigBee Green Power dissector
Michael Mann
changed
bug 9424
What |
Removed |
Added |
Attachment #12205 is obsolete |
|
1
|
Attachment #12205 Flags |
review_for_checkin?
|
|
Comment # 14
on bug 9424
from Michael Mann
Created attachment 12262 [details]
ZigBee Green Power
I did some cleanup (mostly in the packet-zbee-nwk-gp.c but found a few related
cleanup items), but more work is needed.
1. Dissectors CAN NOT change the visited flag (packet-zbee-nwk.c)
2. The use of pinfo->private_data is trying to be deprecated. You should be
able to just pass the data as a parameter if needed.
3. dec_buffer can leak if dissector is called (return before free). Not sure
g_malloc should be used here anyway.
4. Many cases of 0x%01x should be 0x%02x (digits, not bytes)
5. There's just "excessive code". Most notiby structures being populated with
few fields really being necesary. You can use an & bit operator and not need a
lot of it. Also, zbee_get_bit_field doesn't make sense for values that are a
single bit and just get used in an if statement (& operator works just fine).
proto_tree_add_item can be used much more so values don't need to be retrieved
"manually" first
6. if (tree) checks should really only be done for a "group" of
proto_tree_add_xxx. The number is arbitrary, but should not be used for
individual calls. proto_tree_add_xxx calls do have NULL protection built in.
7. There are still some lindering proto_tree_add_text values that could be
converted to proto_tree_add_item, which would also cut down on the need for
some local variables.
You are receiving this mail because:
- You are watching all bug changes.