aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-05 07:09:56 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-05 07:09:56 -0700
commit2c42ef3eb3cca8261d7ea466b8254441f8414b02 (patch)
treeddf126ce730e7644786cd956e6705c56243ec300 /src/core/surface
parent8674cb10eb1c8f02de5ad36aaa6bd4d7638de384 (diff)
parentb15d37a3c8382d156bae89466d2cef32d668253e (diff)
Merge github.com:grpc/grpc into we-dont-need-no-backup
Diffstat (limited to 'src/core/surface')
-rw-r--r--src/core/surface/byte_buffer_reader.c15
-rw-r--r--src/core/surface/call.c1
-rw-r--r--src/core/surface/call_log_batch.c1
-rw-r--r--src/core/surface/channel_create.c1
-rw-r--r--src/core/surface/event_string.c1
-rw-r--r--src/core/surface/init.c1
-rw-r--r--src/core/surface/secure_channel_create.c1
-rw-r--r--src/core/surface/server.c1
8 files changed, 14 insertions, 8 deletions
diff --git a/src/core/surface/byte_buffer_reader.c b/src/core/surface/byte_buffer_reader.c
index fd5289bac3..41ad700274 100644
--- a/src/core/surface/byte_buffer_reader.c
+++ b/src/core/surface/byte_buffer_reader.c
@@ -39,15 +39,18 @@
#include <grpc/support/slice_buffer.h>
#include <grpc/byte_buffer.h>
-grpc_byte_buffer_reader *grpc_byte_buffer_reader_create(
- grpc_byte_buffer *buffer) {
- grpc_byte_buffer_reader *reader = malloc(sizeof(grpc_byte_buffer_reader));
+void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
+ grpc_byte_buffer *buffer) {
reader->buffer = buffer;
switch (buffer->type) {
case GRPC_BB_SLICE_BUFFER:
reader->current.index = 0;
}
- return reader;
+}
+
+void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) {
+ /* no-op: the user is responsible for memory deallocation.
+ * Other cleanup operations would go here if needed. */
}
int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
@@ -68,7 +71,3 @@ int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
}
return 0;
}
-
-void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) {
- free(reader);
-}
diff --git a/src/core/surface/call.c b/src/core/surface/call.c
index 2d651be6a5..84a77c45c4 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -42,6 +42,7 @@
#include "src/core/surface/completion_queue.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <assert.h>
#include <stdio.h>
diff --git a/src/core/surface/call_log_batch.c b/src/core/surface/call_log_batch.c
index 9905401bee..55663298c9 100644
--- a/src/core/surface/call_log_batch.c
+++ b/src/core/surface/call_log_batch.c
@@ -35,6 +35,7 @@
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
+#include <grpc/support/string_util.h>
int grpc_trace_batch = 0;
diff --git a/src/core/surface/channel_create.c b/src/core/surface/channel_create.c
index d137ce12ac..d069a04a9a 100644
--- a/src/core/surface/channel_create.c
+++ b/src/core/surface/channel_create.c
@@ -53,6 +53,7 @@
#include "src/core/transport/chttp2_transport.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/useful.h>
diff --git a/src/core/surface/event_string.c b/src/core/surface/event_string.c
index 448bb1162b..33cd4a43aa 100644
--- a/src/core/surface/event_string.c
+++ b/src/core/surface/event_string.c
@@ -37,6 +37,7 @@
#include "src/core/support/string.h"
#include <grpc/byte_buffer.h>
+#include <grpc/support/string_util.h>
static void addhdr(gpr_strvec *buf, grpc_event *ev) {
char *tmp;
diff --git a/src/core/surface/init.c b/src/core/surface/init.c
index ac6871c6f2..ca61a38a35 100644
--- a/src/core/surface/init.c
+++ b/src/core/surface/init.c
@@ -78,6 +78,7 @@ void grpc_shutdown(void) {
grpc_iomgr_shutdown();
census_shutdown();
grpc_timers_global_destroy();
+ grpc_tracer_shutdown();
}
gpr_mu_unlock(&g_init_mu);
}
diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c
index 4854ec9ded..fae3e4e90a 100644
--- a/src/core/surface/secure_channel_create.c
+++ b/src/core/surface/secure_channel_create.c
@@ -56,6 +56,7 @@
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/useful.h>
#include "src/core/tsi/transport_security_interface.h"
diff --git a/src/core/surface/server.c b/src/core/surface/server.c
index 68b8d839a0..525fe2e103 100644
--- a/src/core/surface/server.c
+++ b/src/core/surface/server.c
@@ -48,6 +48,7 @@
#include "src/core/transport/metadata.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
typedef enum { PENDING_START, ALL_CALLS, CALL_LIST_COUNT } call_list;