diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-07-04 14:27:04 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-07-07 01:46:59 +0000 |
commit | aa4066dccfa763ebd5a8d0e224c753d977deee70 (patch) | |
tree | f96833972df26fb500eeddbd0905d9c2a6868e31 /epan/dissectors/packet-skinny.c | |
parent | 0a2f6fc01a9170ffc29570436c5496c046612a56 (diff) |
skinny: fix retval, convert from tvb_length
New dissectors return an integer, not a boolean, fix that.
Change-Id: I79dea0cc4274d503d61ce8823dc783c542764f6b
Reviewed-on: https://code.wireshark.org/review/2884
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-skinny.c')
-rw-r--r-- | epan/dissectors/packet-skinny.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index 00b20718fc..47d09825cf 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -3458,12 +3458,12 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da } } tap_queue_packet(skinny_tap, pinfo, si); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Code to actually dissect the packets */ -static gboolean +static int dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { /* The general structure of a packet: {IP-Header|TCP-Header|n*SKINNY} @@ -3475,9 +3475,9 @@ dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) /* check, if this is really an SKINNY packet, they start with a length + 0 */ - if (tvb_length_remaining(tvb, 0) < 8) + if (tvb_captured_length(tvb) < 8) { - return FALSE; + return 0; } /* get relevant header information */ hdr_data_length = tvb_get_letohl(tvb, 0); @@ -3496,7 +3496,7 @@ dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) ) { /* Not an SKINNY packet, just happened to use the same port */ - return FALSE; + return 0; } /* Make entries in Protocol column and Info column on summary display */ @@ -3507,7 +3507,7 @@ dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) tcp_dissect_pdus(tvb, pinfo, tree, skinny_desegment, 4, get_skinny_pdu_len, dissect_skinny_pdu, data); - return TRUE; + return tvb_captured_length(tvb); } /* Register the protocol with Wireshark */ |