summaryrefslogtreecommitdiff
path: root/lib/http2.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-07-23 09:23:56 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-07-23 09:23:56 +0200
commit81cd24adb8bf09ef26ab8cf56955136711dbd7df (patch)
treed640d14e8c6fe72e1682324d4a066870f13cef7d /lib/http2.h
parent713f96ee0c14d231d89f52f0ad0471336c147e97 (diff)
downloadcurl-81cd24adb8bf09ef26ab8cf56955136711dbd7df.tar.gz
http2: more and better error checking
1 - fixes the warnings when built without http2 support 2 - adds CURLE_HTTP2, a new error code for errors detected by nghttp2 basically when they are about http2 specific things.
Diffstat (limited to 'lib/http2.h')
-rw-r--r--lib/http2.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http2.h b/lib/http2.h
index 5c0ce8e80..66aa6fd5c 100644
--- a/lib/http2.h
+++ b/lib/http2.h
@@ -37,13 +37,13 @@ CURLcode Curl_http2_send_request(struct connectdata *conn);
CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req,
struct connectdata *conn);
CURLcode Curl_http2_setup(struct connectdata *conn);
-int Curl_http2_switched(struct connectdata *conn);
+CURLcode Curl_http2_switched(struct connectdata *conn);
#else /* USE_NGHTTP2 */
#define Curl_http2_init(x) CURLE_UNSUPPORTED_PROTOCOL
#define Curl_http2_send_request(x) CURLE_UNSUPPORTED_PROTOCOL
#define Curl_http2_request_upgrade(x,y) CURLE_UNSUPPORTED_PROTOCOL
#define Curl_http2_setup(x) CURLE_UNSUPPORTED_PROTOCOL
-#define Curl_http2_switched(x) (-1)
+#define Curl_http2_switched(x) CURLE_UNSUPPORTED_PROTOCOL
#endif
#endif /* HEADER_CURL_HTTP2_H */