path: root/prefs-int.h
diff options
authorGuy Harris <guy@alum.mit.edu>2001-11-04 02:50:21 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-04 02:50:21 +0000
commitcc7347ebf6888d718c1216ff81488447eaaeafcd (patch)
tree571378721f73038ee7db6c58e814cde559b8a647 /prefs-int.h
parent52bf3d770f472b5a605ac4114c9ef1535a041f2f (diff)
Allow a dissector to register preferences that it no longer supports as
obsolete; we silently ignore attempts to set those in a preferences file, so that we don't spam the user with error messages caused by them having saved preferences in an earlier release that contained those preferences. Make the Diameter and iSCSI dissectors register obsolete preferences. Crash if some code tries to register a preferences module with a name that contains something other than lower-case ASCII letters, numbers, or underscores, or that has already been registered, or if some code tries to register a preference with a name that contains something other than lower-case ASCII letters, numbers, underscores, or periods, or that has already been registered, so that we don't put code like that in a release and have to shovel code into "prefs.c" to fix it up later. (The problem with multiple modules or preferences with the same name should be obvious; the problem with names with blanks, or upper-case letters, or punctuation, is that they're a pain to type on the command line.) svn path=/trunk/; revision=4148
Diffstat (limited to 'prefs-int.h')
1 files changed, 8 insertions, 4 deletions
diff --git a/prefs-int.h b/prefs-int.h
index 04eb084c38..352e19f663 100644
--- a/prefs-int.h
+++ b/prefs-int.h
@@ -2,12 +2,11 @@
* Definitions for implementation of preference handling routines;
* used by "friends" of the preferences type.
- * $Id: prefs-int.h,v 1.3 2000/11/18 21:41:36 guy Exp $
+ * $Id: prefs-int.h,v 1.4 2001/11/04 02:50:19 guy Exp $
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -36,11 +35,16 @@ struct pref_module {
gboolean prefs_changed; /* if TRUE, a preference has changed since we last checked */
+ * PREF_OBSOLETE is used for preferences that a module used to support
+ * but no longer supports; we give different error messages for them.
+ */
typedef enum {
} pref_type_t;
struct preference {