> If there's a default configuration file which should always be present
> and readable, it should report the problem to the user when it starts up.
No there is not a default configuration file, it makes very little
sense to have one.
> If only users who are using mate need to have a configuration file, it
> should be silent about the problem until they try to use it; there's no
> point in bothering the user about it if they're not using mate. It
> should, however, report the problem.
While trying to do this I changed the default configuration filename
to "". and make sure mate would not try to compile if the config
filename is an empty string.
Here is the issue: if mate's preference was changed it failed to start
ethereal just aborted in an assertion in
proto_register_subtree_array() because when the preferences chage mate
tryes to register its subtree array after the tree_is_expanded array
is already allocated.
I could preallocate in mate a very large subtree array and tghe pass
to mate's config items elements in this array but tghat would be
cumbersome and would impose a limit on tyhe number of items that can
be easily avoided.
I have attached a pacth to epan/proto.c to allow
proto_register_subtree_array to expand the tree_is_expanded array if
it has already been allocated instead of just bailing out.
> A failure to open a file in a plugin should be reported with the
> report_open_failure() routine declared in epan/epan.h - that'll put up
> an alert box in Ethereal and print a message in Tethereal. There are
> also report_read_failure() routines to report I/O errors when reading a
> file (code should check for read errors as well), and for errors in, for
> example, the contents of the file, report_failure() should be used.
Good to know, I'll change mate's setup to use report_failure() insted
of g_warning().
What about runtime "errors" is a g_message fine in those cases or
should mate just be quiet?
Mate has a debug facility is it ok for it to use g_message whenever it
is not sending the debug output to a file?
Thanks
Attachment:
proto.c.patch
Description: Binary data