diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-22 22:59:08 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-23 13:09:55 +0000 |
commit | 2bbbb4879c3e0885fd971bd75ca88a183feb92f0 (patch) | |
tree | 9bbd51756fa6230f3555612e27863b316371ad38 /epan/dissectors/packet-gsm_a_rp.c | |
parent | 073cfb33ec84f12d7904f0e6ed2b0a5d049f4ded (diff) |
register_dissector -> new_register_dissector
Change-Id: Ic368dd8e83cf39e0c934da0ae2744778e2d54ce6
Reviewed-on: https://code.wireshark.org/review/12050
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_rp.c')
-rw-r--r-- | epan/dissectors/packet-gsm_a_rp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dissectors/packet-gsm_a_rp.c b/epan/dissectors/packet-gsm_a_rp.c index 3f47859a99..be5eb4208a 100644 --- a/epan/dissectors/packet-gsm_a_rp.c +++ b/epan/dissectors/packet-gsm_a_rp.c @@ -418,8 +418,8 @@ static void (*rp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo /* GENERIC DISSECTOR FUNCTIONS */ -static void -dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { guint8 oct; guint32 offset, saved_offset; @@ -475,9 +475,9 @@ dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint_format(rp_tree, hf_gsm_a_rp_msg_type, tvb, saved_offset, 1, oct, "Message Type %s", str ? str : "(Unknown)"); - if (str == NULL) return; + if (str == NULL) return offset; - if (offset >=len) return; + if (offset >=len) return offset; /* * decode elements @@ -490,6 +490,7 @@ dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { (*rp_msg_fcn[idx])(tvb, rp_tree, pinfo, offset, len - offset); } + return tvb_captured_length(tvb); } /* Register the protocol with Wireshark */ @@ -559,7 +560,7 @@ proto_register_gsm_a_rp(void) expert_gsm_a_rp = expert_register_protocol(proto_a_rp); expert_register_field_array(expert_gsm_a_rp, ei, array_length(ei)); - register_dissector("gsm_a_rp", dissect_rp, proto_a_rp); + new_register_dissector("gsm_a_rp", dissect_rp, proto_a_rp); } void @@ -567,7 +568,7 @@ proto_reg_handoff_gsm_a_rp(void) { dissector_handle_t gsm_a_rp_handle; - gsm_a_rp_handle = create_dissector_handle(dissect_rp, proto_a_rp); + gsm_a_rp_handle = new_create_dissector_handle(dissect_rp, proto_a_rp); /* Dissect messages embedded in SIP */ dissector_add_string("media_type","application/vnd.3gpp.sms", gsm_a_rp_handle); gsm_sms_handle = find_dissector("gsm_sms"); |