Use FT_UINT_STRING for TBCP DENY reason-phrase
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 21 Aug 2006 11:41:32 +0000 (11:41 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 21 Aug 2006 11:41:32 +0000 (11:41 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18968 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rtcp.c

index 1bc9a2bb02a33362ed3657c4a9c09413e2d80a85..529fd02e1ad64da0cc34f9f40f959148fc7490fe 100644 (file)
@@ -330,7 +330,6 @@ static int hf_rtcp_app_poc1_ssrc_granted    = -1;
 static int hf_rtcp_app_poc1_last_pkt_seq_no = -1;
 static int hf_rtcp_app_poc1_ignore_seq_no = -1;
 static int hf_rtcp_app_poc1_reason_code1       = -1;
-static int hf_rtcp_app_poc1_item_len           = -1;
 static int hf_rtcp_app_poc1_reason1_phrase     = -1;
 static int hf_rtcp_app_poc1_reason_code2       = -1;
 static int hf_rtcp_app_poc1_new_time_request   = -1;
@@ -968,17 +967,13 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
                                                                   "Unknown"));
                                }
 
-                               /* Item length, 8 bits */
-                               item_len = tvb_get_guint8( tvb, offset );
-                               proto_tree_add_item( PoC1_tree, hf_rtcp_app_poc1_item_len, tvb, offset, 1, FALSE );
-                               offset++;
-                               packet_len--;
-
                                /* Reason phrase */
+                               item_len = tvb_get_guint8( tvb, offset );
                                if ( item_len != 0 )
-                                       proto_tree_add_item( PoC1_tree, hf_rtcp_app_poc1_reason1_phrase, tvb, offset, item_len, FALSE );
-                               offset += item_len;
-                               packet_len -= item_len;
+                                       proto_tree_add_item( PoC1_tree, hf_rtcp_app_poc1_reason1_phrase, tvb, offset, 1, FALSE );
+
+                               offset += (item_len+1);
+                               packet_len -= (item_len+1);
                                }
                                break;
 
@@ -1138,7 +1133,7 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
 
                                /* Show how many flags were set */
                                proto_item_append_text(content, " (%u items)", items_set);
-                               
+
                                /* Session type */
                                proto_tree_add_item( PoC1_tree, hf_rtcp_app_poc1_conn_session_type, tvb, offset + 2, 1, FALSE );
 
@@ -2929,24 +2924,12 @@ proto_register_rtcp(void)
                                "", HFILL
                        }
                },
-               {
-                       &hf_rtcp_app_poc1_item_len,
-                       {
-                               "Item length",
-                               "rtcp.app.poc1.item.len",
-                               FT_UINT8,
-                               BASE_DEC,
-                               NULL,
-                               0x0,
-                               "", HFILL
-                       }
-               },
                {
                        &hf_rtcp_app_poc1_reason1_phrase,
                        {
                                "Reason Phrase",
                                "rtcp.app.poc1.reason.phrase",
-                               FT_STRING,
+                               FT_UINT_STRING,
                                BASE_NONE,
                                NULL,
                                0x0,