diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2008-07-23 21:04:48 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2008-07-23 21:04:48 +0000 |
commit | a5c48c4c6fbe5194a99f7f3e44ae05a68f0f6620 (patch) | |
tree | 3a37c0a28dc47b317d6b57e3f536e06ea670bac6 /epan/dissectors/packet-megaco.c | |
parent | f97023f302762d9461508074d463c101aa758c98 (diff) |
Don't use proto_tree_add_string_hidden() any more: it's deprecated.
svn path=/trunk/; revision=25808
Diffstat (limited to 'epan/dissectors/packet-megaco.c')
-rw-r--r-- | epan/dissectors/packet-megaco.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index 530d4c2d5f..01e7327c47 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -302,6 +302,19 @@ static gint find_megaco_messageBody_names(tvbuff_t *tvb, int offset, guint heade return -1; } +proto_item * +my_proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, + gint start, gint length, const char *value) +{ + proto_item *pi; + + pi = proto_tree_add_string(tree, hfindex, tvb, start, length, value); + if (global_megaco_dissect_tree) { + PROTO_ITEM_SET_HIDDEN(pi); + } + + return(pi); +} /* * dissect_megaco_text - The dissector for the MEGACO Protocol, using * text encoding. @@ -315,7 +328,6 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gint tvb_command_start_offset, tvb_command_end_offset; gint tvb_descriptors_start_offset, tvb_descriptors_end_offset; proto_tree *megaco_tree, *message_tree, *message_body_tree, *megaco_context_tree, *megaco_tree_command_line, *ti, *sub_ti; - proto_item* (*my_proto_tree_add_string)(proto_tree*, int, tvbuff_t*, gint, gint, const char*); guint8 word[7]; guint8 TermID[30]; @@ -352,16 +364,16 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) RBRKT_counter = 0; LBRKT_counter = 0; - /* Check if H.248 in otp(Erlang) internal format + /* Check if H.248 in otp(Erlang) internal format * XXX Needs improvment? * Ref: - * http://www.erlang.org/doc/apps/megaco/part_frame.html + * http://www.erlang.org/doc/apps/megaco/part_frame.html * 4.1 Internal form of messages - * 4.2 The different encodings + * 4.2 The different encodings */ dword = tvb_get_ntoh24(tvb,0); if ((dword == 0x836803)&&(h248_otp_handle)){ - call_dissector(h248_otp_handle, tvb, pinfo, tree); + call_dissector(h248_otp_handle, tvb, pinfo, tree); return; } @@ -411,11 +423,6 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree,proto_megaco,tvb, 0, -1, FALSE); megaco_tree = proto_item_add_subtree(ti, ett_megaco); - if(global_megaco_dissect_tree) - my_proto_tree_add_string = proto_tree_add_string; - else - my_proto_tree_add_string = proto_tree_add_string_hidden; - /* Format of 'message' is = MegacopToken SLASH Version SEP mId SEP messageBody */ /* MegacopToken = "MEGACO" or "!" */ /* According to H248.1-200205 Annex B Text encoding ( protocol version 2 ) */ |