diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-23 10:56:36 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-23 17:36:39 +0000 |
commit | 57e18b00346f86f0b5d182fcc749a1a005fadb96 (patch) | |
tree | 9e588cfef7c1110e8f7423a550787e8c06c35e69 /epan/dissectors/packet-tn5250.c | |
parent | 5afbf7e0e5c8116002cbd06abce48b410855d5e1 (diff) |
register_dissector -> new_register_dissector
Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9
Reviewed-on: https://code.wireshark.org/review/12073
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-tn5250.c')
-rw-r--r-- | epan/dissectors/packet-tn5250.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-tn5250.c b/epan/dissectors/packet-tn5250.c index db2e9db84b..fd06a13c64 100644 --- a/epan/dissectors/packet-tn5250.c +++ b/epan/dissectors/packet-tn5250.c @@ -5114,8 +5114,8 @@ dissect_inbound_stream(proto_tree *tn5250_tree, packet_info *pinfo, tvbuff_t *tv return (offset - start); } -static void -dissect_tn5250(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_tn5250(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *tn5250_tree; proto_item *ti; @@ -5124,8 +5124,6 @@ dissect_tn5250(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tn5250_conv_info_t *tn5250_info = NULL; int sna_flag; - pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; - /* Do we have a conversation for this connection? */ conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, @@ -5136,7 +5134,9 @@ dissect_tn5250(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (!tn5250_info) - return; + return 0; + + pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; col_set_str(pinfo->cinfo, COL_PROTOCOL, "TN5250"); @@ -5161,6 +5161,7 @@ dissect_tn5250(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } + return tvb_captured_length(tvb); } void @@ -7545,7 +7546,7 @@ proto_register_tn5250(void) expert_module_t* expert_tn5250; proto_tn5250 = proto_register_protocol("TN5250 Protocol", "TN5250", "tn5250"); - register_dissector("tn5250", dissect_tn5250, proto_tn5250); + new_register_dissector("tn5250", dissect_tn5250, proto_tn5250); proto_register_field_array(proto_tn5250, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_tn5250 = expert_register_protocol(proto_tn5250); |