Use the name from hf_fragment instead of hf_fragments when we only have

one fragment to reassemble.

svn path=/trunk/; revision=34285
This commit is contained in:
Stig Bjørlykke 2010-09-30 09:53:51 +00:00
parent 65e0721f71
commit 46749e843c
1 changed files with 9 additions and 3 deletions

View File

@ -1969,9 +1969,15 @@ show_fragment(fragment_data *fd, const int offset, const fragment_items *fit,
int hf;
if (first_frag) {
proto_item_prepend_text(fi, "%u ", count);
proto_item_append_text(fi, " (%u byte%s): ", tvb_length(tvb),
plurality(tvb_length(tvb), "", "s"));
gchar *name;
if (count == 1) {
name = g_strdup(proto_registrar_get_name(*(fit->hf_fragment)));
} else {
name = g_strdup(proto_registrar_get_name(*(fit->hf_fragments)));
}
proto_item_set_text(fi, "%u %s (%u byte%s): ", count, name, tvb_length(tvb),
plurality(tvb_length(tvb), "", "s"));
g_free(name);
} else {
proto_item_append_text(fi, ", ");
}