aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/http
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-05 10:28:15 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-05 10:28:15 -0700
commit529102373061d599f861528e180bfdc2860f6b5f (patch)
tree2e4fc843fa7a093e3128fccddbbe795136f91acc /src/core/lib/http
parent76eab735f41baf8dd8af6524a8ce673a5803f5d4 (diff)
parentc277fc0818eb2e7408db6758c9690bb4eb2c6ff7 (diff)
Merge github.com:grpc/grpc into flowctl+millis
Diffstat (limited to 'src/core/lib/http')
-rw-r--r--src/core/lib/http/format_request.cc (renamed from src/core/lib/http/format_request.c)0
-rw-r--r--src/core/lib/http/format_request.h10
-rw-r--r--src/core/lib/http/httpcli.cc (renamed from src/core/lib/http/httpcli.c)0
-rw-r--r--src/core/lib/http/httpcli.h10
-rw-r--r--src/core/lib/http/httpcli_security_connector.cc (renamed from src/core/lib/http/httpcli_security_connector.c)9
-rw-r--r--src/core/lib/http/parser.cc (renamed from src/core/lib/http/parser.c)0
-rw-r--r--src/core/lib/http/parser.h10
7 files changed, 32 insertions, 7 deletions
diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.cc
index 88fb0ab0b6..88fb0ab0b6 100644
--- a/src/core/lib/http/format_request.c
+++ b/src/core/lib/http/format_request.cc
diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h
index 12b42e42fa..a559aac660 100644
--- a/src/core/lib/http/format_request.h
+++ b/src/core/lib/http/format_request.h
@@ -22,6 +22,10 @@
#include <grpc/slice.h>
#include "src/core/lib/http/httpcli.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request);
grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
const char *body_bytes,
@@ -29,4 +33,8 @@ grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
grpc_slice grpc_httpcli_format_connect_request(
const grpc_httpcli_request *request);
-#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */ \ No newline at end of file
diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.cc
index c96800b85c..c96800b85c 100644
--- a/src/core/lib/http/httpcli.c
+++ b/src/core/lib/http/httpcli.cc
diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h
index a3baf512a3..3e6bdc0e46 100644
--- a/src/core/lib/http/httpcli.h
+++ b/src/core/lib/http/httpcli.h
@@ -32,6 +32,10 @@
/* User agent this library reports */
#define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Tracks in-progress http requests
TODO(ctiller): allow caching and capturing multiple requests for the
same content and combining them */
@@ -123,4 +127,8 @@ typedef int (*grpc_httpcli_post_override)(
void grpc_httpcli_set_override(grpc_httpcli_get_override get,
grpc_httpcli_post_override post);
-#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */ \ No newline at end of file
diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.cc
index 355dfce2a6..ef6c4a509b 100644
--- a/src/core/lib/http/httpcli_security_connector.c
+++ b/src/core/lib/http/httpcli_security_connector.cc
@@ -106,7 +106,8 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create(
return GRPC_SECURITY_ERROR;
}
- c = gpr_zalloc(sizeof(grpc_httpcli_ssl_channel_security_connector));
+ c = (grpc_httpcli_ssl_channel_security_connector *)gpr_zalloc(
+ sizeof(grpc_httpcli_ssl_channel_security_connector));
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.vtable = &httpcli_ssl_vtable;
@@ -137,8 +138,8 @@ typedef struct {
static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
- grpc_handshaker_args *args = arg;
- on_done_closure *c = args->user_data;
+ grpc_handshaker_args *args = (grpc_handshaker_args *)arg;
+ on_done_closure *c = (on_done_closure *)args->user_data;
if (error != GRPC_ERROR_NONE) {
const char *msg = grpc_error_string(error);
gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg);
@@ -159,7 +160,7 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg,
grpc_millis deadline,
void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg,
grpc_endpoint *endpoint)) {
- on_done_closure *c = gpr_malloc(sizeof(*c));
+ on_done_closure *c = (on_done_closure *)gpr_malloc(sizeof(*c));
const char *pem_root_certs = grpc_get_default_ssl_roots();
if (pem_root_certs == NULL) {
gpr_log(GPR_ERROR, "Could not get default pem root certs.");
diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.cc
index 0950bd655e..0950bd655e 100644
--- a/src/core/lib/http/parser.c
+++ b/src/core/lib/http/parser.cc
diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h
index c8dced3901..5484948bea 100644
--- a/src/core/lib/http/parser.h
+++ b/src/core/lib/http/parser.h
@@ -27,6 +27,10 @@
/* Maximum length of a header string of the form 'Key: Value\r\n' */
#define GRPC_HTTP_PARSER_MAX_HEADER_LENGTH 4096
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A single header to be passed in a request */
typedef struct grpc_http_header {
char *key;
@@ -109,4 +113,8 @@ void grpc_http_response_destroy(grpc_http_response *response);
extern grpc_tracer_flag grpc_http1_trace;
-#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */ \ No newline at end of file