Wireshark-dev: Re: [Wireshark-dev] r52604: Adding to col info is probably useless as next disse

From: didier <dgautheron@xxxxxxxx>
Date: Fri, 18 Oct 2013 05:40:27 +0200
Hi
Le lundi 14 octobre 2013 ᅵ 21:26 +0200, Jakub Zawadzki a ᅵcrit :
> Hi Anders,
> 
> Please revert it, dissectors after vlan can be disabled.

> If we want to have some lazy COL_INFO calculation - that's fine for me,
> but selectively disabling col_add_fstr is NACK for me.
Yes vlan can either:
> - throw an exception, can be guarded by replacing 
col_add_fstr(pinfo->cinfo, COL_INFO,... 
with
if tvb_length() < 4 col_add_fstr

- call ethertype or dissect_802_3 which are void but could return
TRUE/FALSE if colinfo has been updated (assuming that a sub dissector
has cleared colinfo), if not then call col_add_fstr() like ethertype do.
There's a corner case: if a sub dissector throw an exception before
clearing colinfo but it should be rare.

Have to change dissect_802_03 a little though, it must use
dissector_only() and call proto_data itself rather than calling
dissector()

Comments?

Didier