From c7316b4c789e0baef1e218bb976540ad89a2682b Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Fri, 17 Apr 2020 17:50:18 +0200 Subject: [PATCH] http2: fix compilation without HAVE_HTTP2. Change-Id: Ie141ee9905e5528bb875401f401ab6a7abaa2e09 Reviewed-on: https://code.wireshark.org/review/36875 Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-http2.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c index b083457b32..d1fed0565f 100644 --- a/epan/dissectors/packet-http2.c +++ b/epan/dissectors/packet-http2.c @@ -2786,8 +2786,13 @@ dissect_http2_data(tvbuff_t *tvb, packet_info *pinfo, http2_session_t* http2_ses /* Headers */ static int +#ifdef HAVE_NGHTTP2 dissect_http2_headers(tvbuff_t *tvb, packet_info *pinfo, http2_session_t* h2session, proto_tree *http2_tree, guint offset, guint8 flags) +#else +dissect_http2_headers(tvbuff_t *tvb, packet_info *pinfo, http2_session_t* h2session _U_, proto_tree *http2_tree, + guint offset, guint8 flags) +#endif { guint16 padding; gint headlen; @@ -2894,7 +2899,7 @@ static int #ifdef HAVE_NGHTTP2 dissect_http2_settings(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session, proto_tree *http2_tree, guint offset, guint8 flags) #else -dissect_http2_settings(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session, proto_tree *http2_tree, guint offset, guint8 flags _U_) +dissect_http2_settings(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session _U_, proto_tree *http2_tree, guint offset, guint8 flags _U_) #endif { guint32 settingsid; @@ -2981,8 +2986,13 @@ dissect_http2_settings(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h /* Push Promise */ static int +#ifdef HAVE_NGHTTP2 dissect_http2_push_promise(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session, proto_tree *http2_tree, guint offset, guint8 flags _U_) +#else +dissect_http2_push_promise(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session _U_, proto_tree *http2_tree, + guint offset, guint8 flags _U_) +#endif { guint16 padding; gint headlen; @@ -3068,7 +3078,11 @@ dissect_http2_window_update(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *h } static int +#ifdef HAVE_NGHTTP2 dissect_http2_continuation(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session, proto_tree *http2_tree, guint offset, guint8 flags) +#else +dissect_http2_continuation(tvbuff_t *tvb, packet_info *pinfo _U_, http2_session_t* h2session _U_, proto_tree *http2_tree, guint offset, guint8 flags) +#endif { guint16 padding; gint headlen;