summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-02-01 20:49:34 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-02-01 20:49:34 +0000
commitf2b23aaffb9cde58de39e018e4c8e8b6c6ade1e3 (patch)
treef2e3bf65b92317ad792480843cd02544bd666f9a
parent9ced4c3074cfe9deaf81210b8337beb5a49d788c (diff)
downloadwireshark-f2b23aaffb9cde58de39e018e4c8e8b6c6ade1e3.tar.gz
Don't call subdissector for dynamic PT based on PT number if conversation info exists.
svn path=/trunk/; revision=20678
-rw-r--r--epan/dissectors/packet-rtp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index 51be1980ba..a83f8edea2 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -423,13 +423,23 @@ dissect_rtp_data( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (p_conv_data && p_conv_data->rtp_dyn_payload) {
gchar *payload_type_str = NULL;
payload_type_str = g_hash_table_lookup(p_conv_data->rtp_dyn_payload, &payload_type);
- if (payload_type_str)
+ if (payload_type_str){
found_match = dissector_try_string(rtp_dyn_pt_dissector_table,
payload_type_str, newtvb, pinfo, tree);
+ /* If payload type string set from conversation and
+ * no matching dissector found it's probably because no subdissector
+ * exists. Don't call the dissectors based on payload number
+ * as that'd probably be the wrong dissector in this case.
+ * Just add it as data.
+ */
+ if(found_match==FALSE)
+ proto_tree_add_item( rtp_tree, hf_rtp_data, newtvb, 0, -1, FALSE );
+ return;
+ }
+
}
}
/* if we don't found, it is static OR could be set static from the preferences */
- if (found_match == FALSE)
if (!dissector_try_port(rtp_pt_dissector_table, payload_type, newtvb, pinfo, tree))
proto_tree_add_item( rtp_tree, hf_rtp_data, newtvb, 0, -1, FALSE );