diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-09-30 09:53:51 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-09-30 09:53:51 +0000 |
commit | e4f22a57657e3ccbd00ba42d4f62c71865f6fd50 (patch) | |
tree | 1fcd477ee39ef9d6f7968c9f726214fb0378aee7 /epan/reassemble.c | |
parent | b24d68580bc465703e23b3d6c98613c4dec6e984 (diff) |
Use the name from hf_fragment instead of hf_fragments when we only have
one fragment to reassemble.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34285 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/reassemble.c')
-rw-r--r-- | epan/reassemble.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c index 6345be1769..a82622f175 100644 --- a/epan/reassemble.c +++ b/epan/reassemble.c @@ -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, ", "); } |