diff options
Diffstat (limited to 'plugins/irda/packet-sir.c')
-rw-r--r-- | plugins/irda/packet-sir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c index 2c445da8f7..d1da1e5713 100644 --- a/plugins/irda/packet-sir.c +++ b/plugins/irda/packet-sir.c @@ -123,8 +123,8 @@ checksum_data(tvbuff_t *tvb, proto_tree *tree) /** Dissects an SIR packet. */ -static void -dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root) +static int +dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root, void* data _U_) { gint offset = 0; gint bof_offset; @@ -140,7 +140,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root) pinfo->desegment_offset = offset; pinfo->desegment_len = 1; } - return; + return tvb_captured_length(tvb); } else { guint preamble_len = bof_offset - offset; gint data_offset = bof_offset + 1; @@ -171,6 +171,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root) } offset = eof_offset + 1; } + return tvb_captured_length(tvb); } @@ -228,7 +229,7 @@ proto_register_irsir(void) proto_sir = proto_register_protocol( "Serial Infrared", "SIR", "sir"); - register_dissector("sir", dissect_sir, proto_sir); + new_register_dissector("sir", dissect_sir, proto_sir); proto_register_subtree_array(ett, array_length(ett)); proto_register_field_array( proto_sir, hf_sir, array_length(hf_sir)); |