diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-10-21 02:10:19 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-10-21 02:10:19 +0000 |
commit | 794757ae8fbee85db2b24bc46b7e9cc492de01df (patch) | |
tree | a955184a13d8444bdec0de9200f261c46cfa2734 /epan/dissectors/packet-turnchannel.c | |
parent | 449d732485da5a19b8a0d3ddef49ed30498712ff (diff) |
For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.
svn path=/trunk/; revision=39503
Diffstat (limited to 'epan/dissectors/packet-turnchannel.c')
-rw-r--r-- | epan/dissectors/packet-turnchannel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-turnchannel.c b/epan/dissectors/packet-turnchannel.c index d49f544236..3e4f8709cf 100644 --- a/epan/dissectors/packet-turnchannel.c +++ b/epan/dissectors/packet-turnchannel.c @@ -54,14 +54,14 @@ static int proto_turnchannel = -1; static int hf_turnchannel_id = -1; static int hf_turnchannel_len = -1; -#define TURNCHANNEL_HDR_LEN ((guint)4) +#define TURNCHANNEL_HDR_LEN ((guint)4) /* Initialize the subtree pointers */ static gint ett_turnchannel = -1; static int -dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo, +dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { guint len; @@ -93,29 +93,29 @@ dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO, "Channel Id 0x%x", channel_id); - ti = proto_tree_add_item(tree, proto_turnchannel, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_turnchannel, tvb, 0, -1, ENC_NA); turnchannel_tree = proto_item_add_subtree(ti, ett_turnchannel); proto_tree_add_uint(turnchannel_tree, hf_turnchannel_id, tvb, 0, 2, channel_id); proto_tree_add_uint(turnchannel_tree, hf_turnchannel_len, tvb, 2, 2, data_len); - + if (len > TURNCHANNEL_HDR_LEN) { tvbuff_t *next_tvb; guint reported_len, new_len; new_len = tvb_length_remaining(tvb, TURNCHANNEL_HDR_LEN); - reported_len = tvb_reported_length_remaining(tvb, + reported_len = tvb_reported_length_remaining(tvb, TURNCHANNEL_HDR_LEN); if (data_len < reported_len) { reported_len = data_len; } - next_tvb = tvb_new_subset(tvb, TURNCHANNEL_HDR_LEN, new_len, + next_tvb = tvb_new_subset(tvb, TURNCHANNEL_HDR_LEN, new_len, reported_len); - if (!dissector_try_heuristic(heur_subdissector_list, + if (!dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree)) { call_dissector(data_handle,next_tvb, pinfo, tree); } |