Prevent duplicate header field registrations.

svn path=/trunk/; revision=28720
This commit is contained in:
Jaap Keuter 2009-06-14 05:35:35 +00:00
parent 9fe70f3a2a
commit a78d986bd1
1 changed files with 2 additions and 5 deletions

View File

@ -141,8 +141,6 @@ static guint alt_port_pref = 0;
static guint8 authenticator[AUTHENTICATOR_LENGTH];
static const value_string* radius_vendors = NULL;
/* http://www.iana.org/assignments/radius-types */
static const value_string radius_vals[] =
{
@ -1358,7 +1356,8 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
{
if(!radius_vendors) register_radius_fields(NULL);
/* Forces load of header fields, if not already done so */
DISSECTOR_ASSERT(proto_registrar_get_byname("radius.code"));
ti = proto_tree_add_item(tree,proto_radius, tvb, 0, rh.rh_pktlength, FALSE);
@ -1952,8 +1951,6 @@ static void register_radius_fields(const char* unused _U_) {
g_free(dir);
radius_vendors = (value_string*)g_array_data(ri.vend_vs);
proto_register_field_array(proto_radius,(hf_register_info*)g_array_data(ri.hf),ri.hf->len);
proto_register_subtree_array((gint**)g_array_data(ri.ett), ri.ett->len);