On Mon, Aug 04, 2003 at 04:23:15PM +0200, Lo�c Minier wrote:
> I see in packet-wtp.c and packet-wsp.c that the proto_register_protocol
> function is called with an abbreviated protocol name matching IANA port
> assignments ("wap-wsp-wtp").
> If I try to add preferences to that dissector, the compile fine is
> ok but during documentation generation and also when I try to run
> tethereal, I get failed assertions:
> ** ERROR **: file prefs.c: line 182 (prefs_register_module_or_subtree): assertion failed: (isascii(*p) && (islower(*p) || isdigit(*p) || *p == '_' || *p == '.'))
The preferences code is being too strict here; I've checked in a change
that should allow hyphens in preference module names. If you're
building from CVS, do a "cvs update" (if you don't get revision 1.103 of
prefs.c, wait a few minutes and try again - anonymous CVS can lag behind
the main CVS archive); if you're building from the nightly CVS
snapshots, get the next snapshot that comes out (2003-08-05); if you're
building from the latest source, apply the attached patch to it.
Index: prefs.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/prefs.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -c -r1.102 -r1.103
*** prefs.c 22 Jul 2003 03:14:28 -0000 1.102
--- prefs.c 4 Aug 2003 17:32:46 -0000 1.103
***************
*** 168,174 ****
/*
* Yes.
* Make sure that only lower-case ASCII letters, numbers,
! * underscores, and dots appear in the name.
*
* Crash if there is, as that's an error in the code;
* you can make the title a nice string with capitalization,
--- 168,174 ----
/*
* Yes.
* Make sure that only lower-case ASCII letters, numbers,
! * underscores, hyphens, and dots appear in the name.
*
* Crash if there is, as that's an error in the code;
* you can make the title a nice string with capitalization,
***************
*** 179,185 ****
for (p = name; *p != '\0'; p++)
g_assert(isascii(*p) &&
(islower(*p) || isdigit(*p) || *p == '_' ||
! *p == '.'));
/*
* Make sure there's not already a module with that
--- 179,185 ----
for (p = name; *p != '\0'; p++)
g_assert(isascii(*p) &&
(islower(*p) || isdigit(*p) || *p == '_' ||
! *p == '-' || *p == '.'));
/*
* Make sure there's not already a module with that