]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2: use ngtcp2_version() to get the run-time version
authorDaniel Stenberg <daniel@haxx.se>
Mon, 19 Aug 2019 21:04:45 +0000 (23:04 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 20 Aug 2019 06:52:22 +0000 (08:52 +0200)
... which of course doesn't have to be the same used at build-time.

Function just recently merged in ngtcp2.

lib/vquic/ngtcp2.c

index bd24df35d44d2eeab6e159c566a23572e101f1a5..9a1fd1690d6708337d80ab9478be236d4c794212 100644 (file)
@@ -1149,8 +1149,9 @@ CURLcode Curl_quic_connect(struct connectdata *conn,
  */
 int Curl_quic_ver(char *p, size_t len)
 {
+  ngtcp2_info *ng2 = ngtcp2_version(0);
   return msnprintf(p, len, " ngtcp2/%s nghttp3/%s",
-                   NGTCP2_VERSION, NGHTTP3_VERSION);
+                   ng2->version_str, NGHTTP3_VERSION);
 }
 
 static int ng_getsock(struct connectdata *conn, curl_socket_t *socks)