diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-24 21:59:51 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-25 13:15:11 +0000 |
commit | dcfea6a06ddf7adeafc8613efe74310251201789 (patch) | |
tree | 04c70020bc89a90670634230a5be0560af7c9c3e /epan/dissectors/packet-vnc.c | |
parent | 479ab3bcdc8d79b27bfc99fcde073457f72126ac (diff) | |
download | wireshark-dcfea6a06ddf7adeafc8613efe74310251201789.tar.gz |
create_dissector_handle -> new_create_dissector_handle
This finalizes the transformation for dissectors.
Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea
Reviewed-on: https://code.wireshark.org/review/12122
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-vnc.c')
-rw-r--r-- | epan/dissectors/packet-vnc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index 19cba28696..5208614f19 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -920,8 +920,8 @@ guint8 vnc_depth; static dissector_handle_t vnc_handle; /* Code to dissect the packets */ -static void -dissect_vnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_vnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { gboolean ret; gint offset = 0; @@ -967,7 +967,7 @@ dissect_vnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) vnc_set_depth(pinfo, vnc_depth); if (ret) { - return; /* We're in a "startup" state; Cannot yet do "normal" processing */ + return tvb_captured_length(tvb); /* We're in a "startup" state; Cannot yet do "normal" processing */ } if(DEST_PORT_VNC || per_conversation_info->server_port == pinfo->destport) { @@ -976,6 +976,7 @@ dissect_vnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) else { vnc_server_to_client(tvb, pinfo, &offset, vnc_tree); } + return tvb_captured_length(tvb); } /* Returns the new offset after processing the 4-byte vendor string */ @@ -1082,7 +1083,7 @@ static gboolean test_vnc_protocol(tvbuff_t *tvb, packet_info *pinfo, pinfo->srcport, pinfo->destport, 0); conversation_set_dissector(conversation, vnc_handle); - dissect_vnc(tvb, pinfo, tree); + dissect_vnc(tvb, pinfo, tree, data); return TRUE; } return FALSE; @@ -4781,7 +4782,7 @@ proto_reg_handoff_vnc(void) static guint vnc_preference_alternate_port_last = 0; if(!inited) { - vnc_handle = create_dissector_handle(dissect_vnc, proto_vnc); + vnc_handle = new_create_dissector_handle(dissect_vnc, proto_vnc); dissector_add_uint("tcp.port", 5500, vnc_handle); dissector_add_uint("tcp.port", 5501, vnc_handle); |