diff options
author | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-04-20 03:59:11 +0000 |
---|---|---|
committer | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-04-20 03:59:11 +0000 |
commit | c16aaa518b8752b511a44884a9b73102c7d7cf09 (patch) | |
tree | d0af5ca2b1715ee231d64f593e67358a3ce6232c /epan/proto.c | |
parent | 4ef93d06510f6354de729d6341e0e64c81a87046 (diff) |
Put BASE_NONE back into the FT_INTn and FT_UINTn display functions
with useful error messages. Some dissector are registering
FT_INTn or FT_UINTn fields with BASE_NONE. Now when ethereal dies
because of it the offending field will be identified so that it
can be fixed.
svn path=/trunk/; revision=3340
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c index 5063155841..614e55a24d 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1,7 +1,7 @@ /* proto.c * Routines for protocol tree * - * $Id: proto.c,v 1.23 2001/04/19 23:21:44 guy Exp $ + * $Id: proto.c,v 1.24 2001/04/20 03:59:11 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -2201,7 +2201,12 @@ hfinfo_uint_vals_format(header_field_info *hfinfo) char *format = NULL; switch(hfinfo->display) { - case BASE_DEC: + case BASE_NONE: + g_printerr("** ERROR **: Illegal use of FIELDBASE: BASE_NONE for FIELDTYPE: %s by header_field: %s\n", + ftype_name(hfinfo->type), + hfinfo->abbrev); + g_assert_not_reached(); + case BASE_DEC: case BASE_BIN: /* I'm lazy */ format = "%s: %s (%u)"; break; @@ -2241,6 +2246,11 @@ hfinfo_uint_format(header_field_info *hfinfo) /* Pick the proper format string */ switch(hfinfo->display) { + case BASE_NONE: + g_printerr("** ERROR **: Illegal use of FIELDBASE: BASE_NONE for FIELDTYPE: %s by header_field: %s\n", + ftype_name(hfinfo->type), + hfinfo->abbrev); + g_assert_not_reached(); case BASE_DEC: case BASE_BIN: /* I'm lazy */ format = "%s: %u"; @@ -2280,6 +2290,11 @@ hfinfo_int_vals_format(header_field_info *hfinfo) char *format = NULL; switch(hfinfo->display) { + case BASE_NONE: + g_printerr("** ERROR **: Illegal use of FIELDBASE: BASE_NONE for FIELDTYPE: %s by header_field: %s\n", + ftype_name(hfinfo->type), + hfinfo->abbrev); + g_assert_not_reached(); case BASE_DEC: case BASE_BIN: /* I'm lazy */ format = "%s: %s (%d)"; @@ -2320,6 +2335,11 @@ hfinfo_int_format(header_field_info *hfinfo) /* Pick the proper format string */ switch(hfinfo->display) { + case BASE_NONE: + g_printerr("** ERROR **: Illegal use of FIELDBASE: BASE_NONE for FIELDTYPE: %s by header_field: %s\n", + ftype_name(hfinfo->type), + hfinfo->abbrev); + g_assert_not_reached(); case BASE_DEC: case BASE_BIN: /* I'm lazy */ format = "%s: %d"; @@ -2762,6 +2782,11 @@ hfinfo_numeric_format(header_field_info *hfinfo) /* Pick the proper format string */ switch(hfinfo->display) { + case BASE_NONE: + g_printerr("** ERROR **: Illegal use of FIELDBASE: BASE_NONE for FIELDTYPE: %s by header_field: %s\n", + ftype_name(hfinfo->type), + hfinfo->abbrev); + g_assert_not_reached(); case BASE_DEC: case BASE_OCT: /* I'm lazy */ case BASE_BIN: /* I'm lazy */ |