aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-03-13 18:17:59 +0000
committerGuy Harris <guy@alum.mit.edu>2003-03-13 18:17:59 +0000
commit283afef8068f2f2e83186f83f6667d3d6f8bf188 (patch)
treebaf1c7cc1fff4cee7465335e5971a8789c64cfbd /prefs.c
parent9de14cd33905883362dc48c21d180738c08928c0 (diff)
From Tomas Kukosa - allow a preference name to begin with the string
that's the name of the module, as long as the prefix doesn't end with "." or "_" (so you can register "tc.tcp.port" or "tc.tcp_port", but not "tc.tc.port" or "tc.tc_port"). svn path=/trunk/; revision=7351
Diffstat (limited to 'prefs.c')
-rw-r--r--prefs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/prefs.c b/prefs.c
index 72484ddf98..ab305fb24a 100644
--- a/prefs.c
+++ b/prefs.c
@@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
- * $Id: prefs.c,v 1.97 2003/03/12 19:45:52 guy Exp $
+ * $Id: prefs.c,v 1.98 2003/03/13 18:17:59 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -429,7 +429,8 @@ register_preference(module_t *module, const char *name, const char *title,
* Make sure the preference name doesn't begin with the
* module name, as that's redundant and Just Silly.
*/
- g_assert(strncmp(name, module->name, strlen(module->name)) != 0);
+ g_assert((strncmp(name, module->name, strlen(module->name)) != 0) ||
+ (((name[strlen(module->name)]) != '.') && ((name[strlen(module->name)]) != '_')));
}
/*