]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
https: Fix build when http2 is disabled
authorDan Fandrich <dan@coneharvesters.com>
Sun, 15 Jun 2014 10:24:47 +0000 (12:24 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 15 Jun 2014 10:24:47 +0000 (12:24 +0200)
lib/http.c
lib/http2.h

index 3cf7346d899c8ae7fd94a310bc25c9b0c1bf017f..78791ee1af3194943c5eb2ee96922e16dfcc5f34 100644 (file)
@@ -2285,7 +2285,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
 
   if(!(conn->handler->flags&PROTOPT_SSL) &&
      (data->set.httpversion == CURL_HTTP_VERSION_2_0)) {
-    /* append HTTP2 updrade magic stuff to the HTTP request if it isn't done
+    /* append HTTP2 upgrade magic stuff to the HTTP request if it isn't done
        over SSL */
     result = Curl_http2_request_upgrade(req_buffer, conn);
     if(result)
index 30a8b591b95958dff8df85306a8f55066dfbfdbc..5c0ce8e80cb0f77791ae0a16ae61ca434d8da608 100644 (file)
@@ -39,11 +39,11 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req,
 CURLcode Curl_http2_setup(struct connectdata *conn);
 int Curl_http2_switched(struct connectdata *conn);
 #else /* USE_NGHTTP2 */
-#define Curl_http2_init(x)
-#define Curl_http2_send_request(x)
-#define Curl_http2_request_upgrade(x,y) CURLE_OK
-#define Curl_http2_switched(x)
-#define Curl_http2_setup(x) Curl_nop_stmt
+#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)
 #endif
 
 #endif /* HEADER_CURL_HTTP2_H */