aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-31 12:16:41 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-31 12:16:41 +0000
commit2e13d25f44d1ccf0bf59da9b971e6922cfb5f08b (patch)
tree108f99d0a27e7055c400e4c3336ee57a0adf53fe /epan
parent0caab510c26007ebb4764fa9e33ccfe66336cb1c (diff)
Use correct functions to fetch protocol name for a dissector registered
by register_dissector(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36413 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-user_encap.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c
index 4602fd6e02..cc1ed5af14 100644
--- a/epan/dissectors/packet-user_encap.c
+++ b/epan/dissectors/packet-user_encap.c
@@ -116,9 +116,8 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
call_dissector(encap->header_proto, hdr_tvb, pinfo, tree);
offset = encap->header_size;
if (encap->header_proto_name) {
- int proto_id = proto_get_id_by_filter_name(encap->header_proto_name);
- if (proto_id != -1) {
- const char *proto_name = proto_get_protocol_name(proto_id);
+ const char *proto_name = dissector_handle_get_long_name(find_dissector(encap->header_proto_name));
+ if (proto_name) {
proto_item_append_text(item, ", Header: %s (%s)", encap->header_proto_name, proto_name);
}
}
@@ -127,9 +126,8 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
payload_tvb = tvb_new_subset(tvb, encap->header_size, len, len);
call_dissector(encap->payload_proto, payload_tvb, pinfo, tree);
if (encap->payload_proto_name) {
- int proto_id = proto_get_id_by_filter_name(encap->payload_proto_name);
- if (proto_id != -1) {
- const char *proto_name = proto_get_protocol_name(proto_id);
+ const char *proto_name = dissector_handle_get_long_name(find_dissector(encap->payload_proto_name));
+ if (proto_name) {
proto_item_append_text(item, ", Payload: %s (%s)", encap->payload_proto_name, proto_name);
}
}
@@ -139,9 +137,8 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
call_dissector(encap->trailer_proto, trailer_tvb, pinfo, tree);
offset = encap->trailer_size;
if (encap->trailer_proto_name) {
- int proto_id = proto_get_id_by_filter_name(encap->trailer_proto_name);
- if (proto_id != -1) {
- const char *proto_name = proto_get_protocol_name(proto_id);
+ const char *proto_name = dissector_handle_get_long_name(find_dissector(encap->trailer_proto_name));
+ if (proto_name) {
proto_item_append_text(item, ", Trailer: %s (%s)", encap->trailer_proto_name, proto_name);
}
}