HTTP2: fix build without nghttp2

http2_get_data_reassembly_mode is not used when nghttp2 is not found.
Put compile guards around it to stop the compiler from complaining about
an unused function.

Change-Id: I5f1fa094d0968d3a877127058adc1024c5013fea
Reviewed-on: https://code.wireshark.org/review/34939
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jaap Keuter 2019-11-03 18:37:48 +01:00 committed by Anders Broman
parent 8541d686e9
commit 8087bcbf6d
1 changed files with 2 additions and 0 deletions

View File

@ -86,6 +86,7 @@ static dissector_table_t media_type_dissector_table;
* to missing nbytes of the head length if entire length of message is undetermined. */
static dissector_table_t streaming_content_type_dissector_table;
#ifdef HAVE_NGHTTP2
/* The type of reassembly mode contains:
* - HTTP2_DATA_REASSEMBLY_MODE_END_STREAM Complete reassembly at the end of stream. (default)
* - HTTP2_DATA_REASSEMBLY_MODE_STREAMING Determined by the desegment_offset and desegment_len fields returned from subdissector.
@ -101,6 +102,7 @@ http2_get_data_reassembly_mode(const gchar* content_type)
return dissector_get_string_handle(streaming_content_type_dissector_table, content_type) ?
HTTP2_DATA_REASSEMBLY_MODE_STREAMING : HTTP2_DATA_REASSEMBLY_MODE_END_STREAM;
}
#endif
/* Decompressed header field */
typedef struct {