aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gnutella.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-gnutella.c')
-rw-r--r--epan/dissectors/packet-gnutella.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gnutella.c b/epan/dissectors/packet-gnutella.c
index a0a281ce3e..df7890dacd 100644
--- a/epan/dissectors/packet-gnutella.c
+++ b/epan/dissectors/packet-gnutella.c
@@ -335,7 +335,7 @@ get_gnutella_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) {
return GNUTELLA_HEADER_LENGTH + size;
}
-static void dissect_gnutella_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+static int dissect_gnutella_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
proto_item *ti, *hi, *pi;
proto_tree *gnutella_tree = NULL;
@@ -507,10 +507,11 @@ static void dissect_gnutella_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
}
}
+ return tvb_length(tvb);
}
-static void dissect_gnutella(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
+static int dissect_gnutella(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) {
proto_item *ti;
proto_tree *gnutella_tree = NULL;
@@ -553,12 +554,13 @@ static void dissect_gnutella(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
-1,
ENC_NA);
}
- return;
+ return tvb_length(tvb);
}
}
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, GNUTELLA_HEADER_SIZE_OFFSET+4,
- get_gnutella_pdu_len, dissect_gnutella_pdu);
+ get_gnutella_pdu_len, dissect_gnutella_pdu, data);
+ return tvb_length(tvb);
}
void proto_register_gnutella(void) {
@@ -742,7 +744,7 @@ void proto_register_gnutella(void) {
void proto_reg_handoff_gnutella(void) {
dissector_handle_t gnutella_handle;
- gnutella_handle = create_dissector_handle(dissect_gnutella,
+ gnutella_handle = new_create_dissector_handle(dissect_gnutella,
proto_gnutella);
dissector_add_uint("tcp.port", GNUTELLA_TCP_PORT, gnutella_handle);
}