Be more consistent about how offset is updated while dissecting lte_rrc fields.
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Dec 2010 17:46:25 +0000 (17:46 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Dec 2010 17:46:25 +0000 (17:46 +0000)
Show cell-id in info column (if don't manage to call RRC).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35237 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-catapult-dct2000.c

index d3ffeb13e05da664718f991c6886116e43407c51..61cdfdd4dc06c2576f645eabc47ddd0cfab9cdf0 100644 (file)
@@ -615,6 +615,7 @@ static void dissect_rrc_lte(tvbuff_t *tvb, gint offset,
     dissector_handle_t protocol_handle = 0;
     gboolean isUplink = FALSE;
     LogicalChannelType logicalChannelType;
+    guint16  cell_id;
     guint8   bcch_transport = 0;
     tvbuff_t *rrc_tvb;
 
@@ -692,16 +693,22 @@ static void dissect_rrc_lte(tvbuff_t *tvb, gint offset,
             /* Cell-id */
             proto_tree_add_item(tree, hf_catapult_dct2000_lte_cellid,
                                 tvb, offset, 2, FALSE);
+            cell_id = tvb_get_ntohs(tvb, offset);
             offset += 2;
 
             /* Logical channel type */
             proto_tree_add_item(tree, hf_catapult_dct2000_lte_rlc_channel_type,
                                 tvb, offset, 1, FALSE);
-            logicalChannelType = (LogicalChannelType)tvb_get_guint8(tvb, offset++);
-            col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+            logicalChannelType = (LogicalChannelType)tvb_get_guint8(tvb, offset);
+            offset++;
+
+            /* Won't be seen if RRC decoder is called... */
+            col_append_fstr(pinfo->cinfo, COL_INFO, " cell-id=%u %s",
+                            cell_id,
                             val_to_str_const(logicalChannelType, rlc_logical_channel_vals,
                                              "UNKNOWN-CHANNEL"));
 
+
             switch (logicalChannelType) {
                 case Channel_BCCH:
                     /* Skip length */