[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 03/220: curl_version_info: provide nghttp2 details
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 03/220: curl_version_info: provide nghttp2 details |
Date: |
Thu, 12 Sep 2019 17:26:03 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 828392ae10e6e7855e66a78c01346f9cd1127467
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Jul 18 10:43:16 2019 +0200
curl_version_info: provide nghttp2 details
Introducing CURLVERSION_SIXTH with nghttp2 info.
Closes #4121
---
docs/libcurl/symbols-in-versions | 1 +
include/curl/curl.h | 9 +++++++--
lib/version.c | 10 ++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
index 5244a7cdb..16fb5622c 100644
--- a/docs/libcurl/symbols-in-versions
+++ b/docs/libcurl/symbols-in-versions
@@ -786,6 +786,7 @@ CURLVERSION_FOURTH 7.16.1
CURLVERSION_NOW 7.10
CURLVERSION_SECOND 7.11.1
CURLVERSION_THIRD 7.12.0
+CURLVERSION_SIXTH 7.66.0
CURL_CHUNK_BGN_FUNC_FAIL 7.21.0
CURL_CHUNK_BGN_FUNC_OK 7.21.0
CURL_CHUNK_BGN_FUNC_SKIP 7.21.0
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 19f6c0b5a..25f095a69 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -2714,6 +2714,7 @@ typedef enum {
CURLVERSION_THIRD,
CURLVERSION_FOURTH,
CURLVERSION_FIFTH,
+ CURLVERSION_SIXTH,
CURLVERSION_LAST /* never actually use this */
} CURLversion;
@@ -2722,7 +2723,7 @@ typedef enum {
meant to be a built-in version number for what kind of struct the caller
expects. If the struct ever changes, we redefine the NOW to another enum
from above. */
-#define CURLVERSION_NOW CURLVERSION_FIFTH
+#define CURLVERSION_NOW CURLVERSION_SIXTH
typedef struct {
CURLversion age; /* age of the returned struct */
@@ -2751,11 +2752,15 @@ typedef struct {
const char *libssh_version; /* human readable string */
/* These fields were added in CURLVERSION_FIFTH */
-
unsigned int brotli_ver_num; /* Numeric Brotli version
(MAJOR << 24) | (MINOR << 12) | PATCH */
const char *brotli_version; /* human readable string. */
+ /* These fields were added in CURLVERSION_SIXTH */
+ unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
+ (MAJOR << 16) | (MINOR << 8) | PATCH */
+ const char *nghttp2_version; /* human readable string. */
+
} curl_version_info_data;
#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */
diff --git a/lib/version.c b/lib/version.c
index 14b0531d3..941313dfb 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -385,6 +385,8 @@ static curl_version_info_data version_info = {
NULL, /* ssh lib version */
0, /* brotli_ver_num */
NULL, /* brotli version */
+ 0, /* nghttp2 version number */
+ NULL /* nghttp2 version string */
};
curl_version_info_data *curl_version_info(CURLversion stamp)
@@ -460,6 +462,14 @@ curl_version_info_data *curl_version_info(CURLversion
stamp)
version_info.brotli_version = brotli_buffer;
#endif
+#ifdef USE_NGHTTP2
+ {
+ nghttp2_info *h2 = nghttp2_version(0);
+ version_info.nghttp2_ver_num = h2->version_num;
+ version_info.nghttp2_version = h2->version_str;
+ }
+#endif
+
(void)stamp; /* avoid compiler warnings, we don't use this */
initialized = true;
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] branch master updated (ee08f49c4 -> 7813ca03b), gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 03/220: curl_version_info: provide nghttp2 details,
gnunet <=
- [GNUnet-SVN] [gnurl] 10/220: curl:create_transfers check return code from curl_easy_setopt, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 07/220: docs/PARALLEL-TRANSFERS: correct the version number, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 01/220: source: remove names from source comments, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 02/220: bump: start working on 7.66.0, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 08/220: curl: remove dead code, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 06/220: docs/PARALLEL-TRANSFERS: added, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 11/220: tool_operate: fix implicit call to easysrc_cleanup, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 17/220: winbuild: add vquic to list of build directories, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 12/220: multi: call detach_connection before Curl_disconnect, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 13/220: ssh-libssh: do not specify O_APPEND when not in append mode, gnunet, 2019/09/12