ngtcp2_conn_shutdown_stream.
/* Define to 1 if you have the `ngtcp2_ccerr_default' function. */
#undef HAVE_NGTCP2_CCERR_DEFAULT
+/* Define if ngtcp2_conn_shutdown_stream has 4 arguments. */
+#undef HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4
+
/* Define to 1 if you have the `ngtcp2_crypto_encrypt_cb' function. */
#undef HAVE_NGTCP2_CRYPTO_ENCRYPT_CB
fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ngtcp2_conn_shutdown_stream has 4 arguments" >&5
+$as_echo_n "checking whether ngtcp2_conn_shutdown_stream has 4 arguments... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+#include <ngtcp2/ngtcp2.h>
+
+int
+main ()
+{
+
+ (void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 1" >>confdefs.h
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
# set static linking for uninstalled libraries if requested
AC_CHECK_MEMBERS([struct ngtcp2_pkt_hd.tokenlen, struct ngtcp2_settings.tokenlen],,,[AC_INCLUDES_DEFAULT
#include <ngtcp2/ngtcp2.h>
])
+
+ AC_MSG_CHECKING([whether ngtcp2_conn_shutdown_stream has 4 arguments])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
+#include <ngtcp2/ngtcp2.h>
+ ],[
+ (void)ngtcp2_conn_shutdown_stream(NULL, 0, 0, 0);
+ ])],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4, 1, [Define if ngtcp2_conn_shutdown_stream has 4 arguments.])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+
fi
# set static linking for uninstalled libraries if requested
if(send_shutdown) {
verbose(VERB_ALGO, "doq: shutdown stream_id %d with app_error_code %d",
(int)stream->stream_id, (int)DOQ_APP_ERROR_CODE);
- ret = ngtcp2_conn_shutdown_stream(conn->conn, stream->stream_id,
- DOQ_APP_ERROR_CODE);
+ ret = ngtcp2_conn_shutdown_stream(conn->conn,
+#ifdef HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4
+ 0,
+#endif
+ stream->stream_id, DOQ_APP_ERROR_CODE);
if(ret != 0) {
log_err("doq ngtcp2_conn_shutdown_stream %d failed: %s",
(int)stream->stream_id, ngtcp2_strerror(ret));
)) {
int rv;
verbose(VERB_ALGO, "doq: no mem for new stream");
- rv = ngtcp2_conn_shutdown_stream(doq_conn->conn, stream_id,
- NGTCP2_CONNECTION_REFUSED);
+ rv = ngtcp2_conn_shutdown_stream(doq_conn->conn,
+#ifdef HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4
+ 0,
+#endif
+ stream_id, NGTCP2_CONNECTION_REFUSED);
if(rv != 0) {
log_err("ngtcp2_conn_shutdown_stream failed: %s",
ngtcp2_strerror(rv));
ngtcp2_strerror(rv));
return 0;
}
- if(c->doq_socket->validate_addr ||
+ if(c->doq_socket->validate_addr ||
#ifdef HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN
hd.tokenlen
#else