aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtmpt.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-17 20:16:06 -0500
committerAnders Broman <a.broman58@gmail.com>2015-11-18 07:33:08 +0000
commit4adeb424f5cdb74ca1f98cd4b87bd72e4d811f03 (patch)
tree6c73d6e0795cc5181ad53242581e4c7f2282081f /epan/dissectors/packet-rtmpt.c
parent13297438d98e3388d650fc55c2a77d5b52367e1f (diff)
create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I9c7d1c092bbae896ec0c2832617891346927f2e1 Reviewed-on: https://code.wireshark.org/review/11932 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rtmpt.c')
-rw-r--r--epan/dissectors/packet-rtmpt.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c
index 124f5fb403..af20f77edd 100644
--- a/epan/dissectors/packet-rtmpt.c
+++ b/epan/dissectors/packet-rtmpt.c
@@ -2314,8 +2314,8 @@ dissect_rtmpt_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
return tvb_reported_length(tvb);
}
-static void
-dissect_rtmpt_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_rtmpt_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
conversation_t *conv;
rtmpt_conv_t *rconv;
@@ -2421,7 +2421,7 @@ dissect_rtmpt_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
RTMPT_DEBUG("RTMPT f=%d cdir=%d seq=%d lastackseq=%d len=%d\n", pinfo->fd->num, cdir, seq, lastackseq, remain);
if (remain < 1)
- return;
+ return offset;
if (offset > 0) {
tvbuff_t *tvbrtmp = tvb_new_subset_length(tvb, offset, remain);
@@ -2429,6 +2429,7 @@ dissect_rtmpt_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else {
dissect_rtmpt_common(tvb, pinfo, tree, rconv, cdir, seq, lastackseq);
}
+ return tvb_captured_length(tvb);
}
static gboolean
@@ -2462,8 +2463,8 @@ dissect_rtmpt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
return FALSE;
}
-static void
-dissect_amf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int
+dissect_amf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *amf_tree, *headers_tree, *messages_tree;
@@ -2525,6 +2526,7 @@ dissect_amf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
offset = dissect_rtmpt_body_command(tvb, offset, messages_tree, FALSE);
}
}
+ return tvb_captured_length(tvb);
}
void
@@ -2936,10 +2938,10 @@ proto_reg_handoff_rtmpt(void)
/* dissector_add_for_decode_as("tcp.port", rtmpt_tcp_handle); */
dissector_add_uint("tcp.port", RTMP_PORT, rtmpt_tcp_handle);
- rtmpt_http_handle = create_dissector_handle(dissect_rtmpt_http, proto_rtmpt);
+ rtmpt_http_handle = new_create_dissector_handle(dissect_rtmpt_http, proto_rtmpt);
dissector_add_string("media_type", "application/x-fcs", rtmpt_http_handle);
- amf_handle = create_dissector_handle(dissect_amf, proto_amf);
+ amf_handle = new_create_dissector_handle(dissect_amf, proto_amf);
dissector_add_string("media_type", "application/x-amf", amf_handle);
}