aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp-midi.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 09:23:33 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:27 +0000
commit28ea58251c04562cc0670e57bf073dc6966e73e6 (patch)
treeabe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-rtp-midi.c
parent13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-rtp-midi.c')
-rw-r--r--epan/dissectors/packet-rtp-midi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/epan/dissectors/packet-rtp-midi.c b/epan/dissectors/packet-rtp-midi.c
index 9eff59953f..2e0c0c179e 100644
--- a/epan/dissectors/packet-rtp-midi.c
+++ b/epan/dissectors/packet-rtp-midi.c
@@ -6105,8 +6105,8 @@ decode_system_journal( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
* external decoders. Afterwards the journal-section is decoded.
*/
-static void
-dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
+static int
+dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_ )
{
proto_item *ti;
proto_tree *rtp_midi_tree;
@@ -6188,8 +6188,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
/* Decode a MIDI-command - if 0 is returned something went wrong */
consumed = decodemidi( tvb, pinfo, rtp_midi_commands_tree, cmd_count, offset, cmd_len, &runningstatus, &rsoffset );
if ( -1 == consumed ) {
- THROW( ReportedBoundsError );
- return;
+ return offset;
}
/* seek to next delta-time and set remaining length */
@@ -6235,8 +6234,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
consumed = decode_system_journal( tvb, pinfo, rtp_midi_journal_tree, offset );
if ( -1 == consumed ) {
- THROW( ReportedBoundsError );
- return;
+ return offset;
}
/* seek to optional channel-journals-section */
@@ -6255,8 +6253,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
consumed = decode_channel_journal( tvb, pinfo, rtp_midi_chanjournals_tree, offset );
if ( -1 == consumed ) {
- THROW( ReportedBoundsError );
- return;
+ return offset;
}
/* seek to next channel-journal */
@@ -6265,6 +6262,7 @@ dissect_rtp_midi( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree )
}
}
}
+ return tvb_captured_length(tvb);
}
@@ -10031,7 +10029,7 @@ proto_register_rtp_midi( void )
rtp_midi_module = prefs_register_protocol ( proto_rtp_midi, proto_reg_handoff_rtp_midi );
prefs_register_uint_preference ( rtp_midi_module, "midi_payload_type_value", "Payload Type for RFC 4695/6295 RTP-MIDI", "This is the value of the Payload Type field that specifies RTP-MIDI", 10, &rtp_midi_payload_type_value );
- register_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION, dissect_rtp_midi, proto_rtp_midi );
+ new_register_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION, dissect_rtp_midi, proto_rtp_midi );
}