summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-imf.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-imf.c')
-rw-r--r--epan/dissectors/packet-imf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index 25997bea97..a3d1a0c34f 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -680,8 +680,8 @@ imf_find_field_end(tvbuff_t *tvb, int offset, gint max_length, gboolean *last_fi
}
-static void
-dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *item;
proto_tree *unknown_tree, *text_tree;
@@ -823,8 +823,8 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_fence(pinfo->cinfo, COL_INFO);
if(content_encoding_str && !g_ascii_strncasecmp(content_encoding_str, "base64", 6)) {
- char *data = tvb_get_string_enc(wmem_packet_scope(), tvb, end_offset, tvb_reported_length(tvb) - end_offset, ENC_ASCII);
- next_tvb = base64_to_tvb(tvb, data);
+ char *string_data = tvb_get_string_enc(wmem_packet_scope(), tvb, end_offset, tvb_reported_length(tvb) - end_offset, ENC_ASCII);
+ next_tvb = base64_to_tvb(tvb, string_data);
add_new_data_source(pinfo, next_tvb, content_encoding_str);
} else {
next_tvb = tvb_new_subset_remaining(tvb, end_offset);
@@ -859,6 +859,7 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
start_offset = end_offset;
}
}
+ return tvb_captured_length(tvb);
}
static void
@@ -1258,7 +1259,7 @@ proto_register_imf(void)
expert_register_field_array(expert_imf, ei, array_length(ei));
/* Allow dissector to find be found by name. */
- imf_handle = register_dissector(PFNAME, dissect_imf, proto_imf);
+ imf_handle = new_register_dissector(PFNAME, dissect_imf, proto_imf);
imf_module = prefs_register_protocol(proto_imf, NULL);
prefs_register_uat_preference(imf_module, "custom_header_fields", "Custom IMF headers",