Use correct hf item, and add reassembled length into subtree summary.
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Sep 2011 13:18:26 +0000 (13:18 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Sep 2011 13:18:26 +0000 (13:18 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38896 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rlc-lte.c

index 216a18901e0a530e74d8c1d1fa73b119d3f6c9dd..d3f20928783bb2d78858f651213b14b8f6362a5c 100644 (file)
@@ -496,7 +496,12 @@ static void reassembly_show_source(rlc_channel_reassembly_info *reassembly_info,
                                     tvb, 0, 0, FALSE);
     source_tree = proto_item_add_subtree(source_ti, ett_rlc_lte_reassembly_source);
     PROTO_ITEM_SET_GENERATED(source_ti);
-    proto_item_append_text(source_ti, " %u segments", reassembly_info->number_of_segments);
+
+    for (n=0; n < reassembly_info->number_of_segments; n++) {
+        total_length += reassembly_info->segments[n].length;
+    }
+    proto_item_append_text(source_ti, " %u segments, %u bytes", reassembly_info->number_of_segments,
+                           total_length);
 
     /* Number of segments */
     ti = proto_tree_add_uint(source_tree,
@@ -505,11 +510,8 @@ static void reassembly_show_source(rlc_channel_reassembly_info *reassembly_info,
     PROTO_ITEM_SET_GENERATED(ti);
 
     /* Total length */
-    for (n=0; n < reassembly_info->number_of_segments; n++) {
-        total_length += reassembly_info->segments[n].length;
-    }
     ti = proto_tree_add_uint(source_tree,
-                             hf_rlc_lte_reassembly_source_number_of_segments,
+                             hf_rlc_lte_reassembly_source_total_length,
                              tvb, 0, 0, total_length);
     PROTO_ITEM_SET_GENERATED(ti);
 
@@ -529,7 +531,7 @@ static void reassembly_show_source(rlc_channel_reassembly_info *reassembly_info,
                                          (n == reassembly_info->number_of_segments-1) ? segment->length : 0,
                                          FALSE);
         segment_tree = proto_item_add_subtree(segment_ti, ett_rlc_lte_reassembly_source_segment);
-        proto_item_append_text(segment_ti, " (SN=%u frame=%u len=%u)",
+        proto_item_append_text(segment_ti, " (SN=%u frame=%u length=%u)",
                                segment->SN, segment->frameNum, segment->length);
         PROTO_ITEM_SET_GENERATED(segment_ti);