aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2014-10-20 22:44:25 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2014-10-20 20:57:45 +0000
commit0bbe48304a50b6f664c2cef8181c5ba90b62b073 (patch)
tree4cbea08aa72e9ad7465e4d66cbfc75990d34b62c /epan/proto.c
parentbc2726578156f3608960fc65ce1f691639e6addc (diff)
Proto: Fixed proto_unregister_field()
This function did not work after svn revision 51396. This fix affects http, imf and ldap preferences. Change-Id: I6fcb24c968d03c7d1fdc018cfa907f9cfd8809bb Reviewed-on: https://code.wireshark.org/review/4881 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 90cb696c16..7231202d48 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5262,7 +5262,7 @@ proto_register_fields_manual(const int parent, header_field_info **hfi, const in
void
proto_unregister_field (const int parent, gint hf_id)
{
- hf_register_info *hf;
+ header_field_info *hfi;
protocol_t *proto;
guint i;
@@ -5275,10 +5275,10 @@ proto_unregister_field (const int parent, gint hf_id)
}
for (i = 0; i < proto->fields->len; i++) {
- hf = (hf_register_info *)g_ptr_array_index(proto->fields, i);
- if (*hf->p_id == hf_id) {
+ hfi = (header_field_info *)g_ptr_array_index(proto->fields, i);
+ if (hfi->id == hf_id) {
/* Found the hf_id in this protocol */
- g_hash_table_steal(gpa_name_map, hf->hfinfo.abbrev);
+ g_hash_table_steal(gpa_name_map, hfi->abbrev);
g_ptr_array_remove_index_fast(proto->fields, i);
return;
}