Ethereal-dev: [Ethereal-dev] trouble registering ett after mate preferences has changed

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Fri, 7 Jan 2005 19:17:42 +0100
I got a problem,  It's been there for a while I have not noticed it until today.
 
Mate uses proto_reg_handoff to register it's hf and ett array. That
way they is created based on its config.

If the preferences change protocols get reinitialized, at that point
the number of tree_types has been set so tree_is_expanded is set as
well. The assertion in proto_register_subtree_array() causes mate to
exit if a configuration file is set.

What I've done as a workarround is to actually expand the
tree_is_expanded array in proto.c:proto_register_subtree_array()
instead of aborting.

the attached patch does so.


If you think this patch is not OK. I could modify mate to use a
predefined ett array and have the variuos subtrees pointing to
elements of that array, but that would impose a limit in the number of
subtrees mate could create and will make using those subtrees
cumbersome.

Luis

Attachment: proto.c.patch
Description: Binary data