diff options
author | Michael Mann <mmann78@netscape.net> | 2014-09-10 20:04:22 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-09-11 06:33:23 +0000 |
commit | 29993d5266ff0a19d0d49a19a0473d7bb17cda43 (patch) | |
tree | 0ccf0e41844fdeaf2d8c0fb5257659bcb157df54 /epan/dissectors/packet-aim-chat.c | |
parent | d5940f576cc9b08b2fcbea71182ed0c7efb7f275 (diff) |
Eliminate proto_tree_add_text from some dissectors.
Change-Id: Ie41ac30f8edaeee75b23717ef1d5147d804a65b3
Reviewed-on: https://code.wireshark.org/review/4074
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-aim-chat.c')
-rw-r--r-- | epan/dissectors/packet-aim-chat.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/epan/dissectors/packet-aim-chat.c b/epan/dissectors/packet-aim-chat.c index a0ff6e592f..b6870613b4 100644 --- a/epan/dissectors/packet-aim-chat.c +++ b/epan/dissectors/packet-aim-chat.c @@ -67,6 +67,8 @@ static const aim_tlv aim_chat_tlvs[] _U_ = { /* Initialize the protocol and registered fields */ static int proto_aim_chat = -1; +static int hf_aim_chat_screen_name = -1; + /* Initialize the subtree pointers */ static gint ett_aim_chat = -1; @@ -114,11 +116,8 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname); col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg); - if(chat_tree) { - proto_tree_add_text(chat_tree, tvb, 31, buddyname_length, - "Screen Name: %s", - format_text(buddyname, buddyname_length)); - } + proto_tree_add_string(chat_tree, hf_aim_chat_screen_name, tvb, 31, buddyname_length, buddyname); + return tvb_length(tvb); } @@ -140,10 +139,11 @@ proto_register_aim_chat(void) { /* Setup list of header fields */ -#if 0 /* FIXME */ static hf_register_info hf[] = { + { &hf_aim_chat_screen_name, + { "Screen Name", "aim_chat.screen_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, }; -#endif /* Setup protocol subtree array */ static gint *ett[] = { @@ -154,8 +154,7 @@ proto_register_aim_chat(void) proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat"); /* Required function calls to register the header fields and subtrees used */ -/*FIXME - proto_register_field_array(proto_aim_chat, hf, array_length(hf));*/ + proto_register_field_array(proto_aim_chat, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } |