summaryrefslogtreecommitdiff
path: root/plugins/irda/packet-irda.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-22 23:11:32 -0500
committerMichael Mann <mmann78@netscape.net>2014-11-23 05:13:52 +0000
commite50095c60094e9fa76f07e3c91154d1508e0d42c (patch)
treebc8074373e14c92adb5d446d56d99e58a4fbccf0 /plugins/irda/packet-irda.c
parente90880477638940645703bc0ddcac6b4079ad4ce (diff)
downloadwireshark-e50095c60094e9fa76f07e3c91154d1508e0d42c.tar.gz
Remove use of pinfo->private_data (which doesn't appear to be used anyway) and pass it as dissector data.
Some other minor cleanup while in the neighborhood. Change-Id: I1b0c0567488fa350c14d21c5f5e4cb9746177af1 Reviewed-on: https://code.wireshark.org/review/5447 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/irda/packet-irda.c')
-rw-r--r--plugins/irda/packet-irda.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index c7b9f30f0a..c858566754 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -265,7 +265,7 @@ typedef struct lmp_conversation {
struct lmp_conversation* pnext;
guint32 iap_result_frame;
gboolean ttp;
- dissector_t proto_dissector;
+ dissector_handle_t dissector;
} lmp_conversation_t;
static const true_false_string lap_cr_vals = {
@@ -626,10 +626,10 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
switch (op)
{
case GET_VALUE_BY_CLASS:
- proto_tree_add_item(tree, hf_iap_class_name, tvb, offset, 1, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_iap_class_name, tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
offset += 1 + clen;
- proto_tree_add_item(tree, hf_iap_attr_name, tvb, offset, 1, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_iap_attr_name, tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
offset += 1 + alen;
break;
}
@@ -841,7 +841,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
if (!iap_conv || !iap_conv->pattr_dissector ||
!iap_conv->pattr_dissector->value_dissector(tvb, offset, pinfo, entry_tree,
n, type, circuit_id))
- proto_tree_add_item(entry_tree, hf_iap_string, tvb, offset + 1, 1, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(entry_tree, hf_iap_string, tvb, offset + 1, 1, ENC_ASCII|ENC_BIG_ENDIAN);
break;
}
offset += attr_len;
@@ -1018,9 +1018,7 @@ static void dissect_appl_proto(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
tvb = tvb_new_subset_remaining(tvb, offset);
}
- pinfo->private_data = (void *)pdu_type;
-
- lmp_conv->proto_dissector(tvb, pinfo, root);
+ call_dissector_with_data(lmp_conv->dissector, tvb, pinfo, root, GUINT_TO_POINTER(pdu_type));
}
else
call_dissector(data_handle, tvb, pinfo, root);
@@ -1198,7 +1196,7 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, g
/*
* Add LMP conversation
*/
-void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissector_t proto_dissector, guint8 circuit_id)
+void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissector_handle_t dissector, guint8 circuit_id)
{
guint8 dest;
address srcaddr;
@@ -1246,7 +1244,7 @@ void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissec
lmp_conv->pnext = NULL;
lmp_conv->iap_result_frame = pinfo->fd->num;
lmp_conv->ttp = ttp;
- lmp_conv->proto_dissector = proto_dissector;
+ lmp_conv->dissector = dissector;
/*g_message("%p\n", lmp_conv); */
}