From 10ffd14b8f9c052a9d44faaba462ff36f5542f7a Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Mon, 10 May 2010 15:54:57 +0000 Subject: Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces) svn path=/trunk/; revision=32735 --- epan/dissectors/packet-aim-chat.c | 47 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'epan/dissectors/packet-aim-chat.c') diff --git a/epan/dissectors/packet-aim-chat.c b/epan/dissectors/packet-aim-chat.c index a29e91d0ca..446cf2640c 100644 --- a/epan/dissectors/packet-aim-chat.c +++ b/epan/dissectors/packet-aim-chat.c @@ -92,11 +92,11 @@ static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, prot buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 ); /* channel message from client */ - aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb) + aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb) - 40 - buddyname_length ); col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg); - + return tvb_length(tvb); } @@ -107,19 +107,19 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot guchar *msg; /* channel message to client */ int buddyname_length; - + buddyname=ep_alloc(MAX_BUDDYNAME_LENGTH+1); msg=ep_alloc(1000); buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 ); - aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) + aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) - 36 - buddyname_length ); 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, + proto_tree_add_text(chat_tree, tvb, 31, buddyname_length, "Screen Name: %s", format_text(buddyname, buddyname_length)); } @@ -127,15 +127,15 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot } static const aim_subtype aim_fnac_family_chat[] = { - { 0x0001, "Error", dissect_aim_snac_error }, - { 0x0002, "Room Info Update", NULL }, - { 0x0003, "User Join", dissect_aim_chat_userinfo_list }, - { 0x0004, "User Leave", dissect_aim_chat_userinfo_list }, - { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg }, - { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg }, - { 0x0007, "Evil Request", NULL }, - { 0x0008, "Evil Reply", NULL }, - { 0, NULL, NULL } + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Room Info Update", NULL }, + { 0x0003, "User Join", dissect_aim_chat_userinfo_list }, + { 0x0004, "User Leave", dissect_aim_chat_userinfo_list }, + { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg }, + { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg }, + { 0x0007, "Evil Request", NULL }, + { 0x0008, "Evil Reply", NULL }, + { 0, NULL, NULL } }; /* Register the protocol with Wireshark */ @@ -144,26 +144,27 @@ proto_register_aim_chat(void) { /* Setup list of header fields */ -/*FIXME - static hf_register_info hf[] = { - };*/ +#if 0 /* FIXME */ + static hf_register_info hf[] = { + }; +#endif /* Setup protocol subtree array */ - static gint *ett[] = { - &ett_aim_chat, - }; + static gint *ett[] = { + &ett_aim_chat, + }; /* Register the protocol name and description */ - proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat"); + 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_subtree_array(ett, array_length(ett)); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_aim_chat(void) { - aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat); + aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat); } -- cgit v1.2.3