aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-09-07 21:58:44 -0700
committerGravatar GitHub <noreply@github.com>2016-09-07 21:58:44 -0700
commit47b2961638328d29577361c3cb4dec5ab5bab537 (patch)
treee522db5b6fe9e16de936f8f1ec3e763e96ec5d4e /src
parent95746dd53e9bc7f78288b761ececd1e27254094c (diff)
parent5928bff0c7765766af2ea1ce8120317810eb4f8c (diff)
Merge pull request #7992 from nicolasnoble/manual-upmerge
Manual upmerge from 1.0.x to master.
Diffstat (limited to 'src')
-rw-r--r--src/cpp/client/channel_cc.cc (renamed from src/cpp/client/channel.cc)0
-rw-r--r--src/cpp/client/credentials_cc.cc (renamed from src/cpp/client/credentials.cc)0
-rw-r--r--src/cpp/common/completion_queue_cc.cc (renamed from src/cpp/common/completion_queue.cc)0
-rw-r--r--src/cpp/server/server_cc.cc (renamed from src/cpp/server/server.cc)0
-rw-r--r--src/cpp/util/byte_buffer_cc.cc (renamed from src/cpp/util/byte_buffer.cc)0
-rw-r--r--src/cpp/util/slice_cc.cc (renamed from src/cpp/util/slice.cc)0
-rw-r--r--src/cpp/util/time_cc.cc (renamed from src/cpp/util/time.cc)0
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c6
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m5
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m5
-rw-r--r--src/proto/grpc/testing/echo.proto2
-rw-r--r--src/python/grpcio/grpc/__init__.py4
-rw-r--r--src/ruby/ext/grpc/extconf.rb4
13 files changed, 17 insertions, 9 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel_cc.cc
index 43b3875cb3..43b3875cb3 100644
--- a/src/cpp/client/channel.cc
+++ b/src/cpp/client/channel_cc.cc
diff --git a/src/cpp/client/credentials.cc b/src/cpp/client/credentials_cc.cc
index e6a4f81b0d..e6a4f81b0d 100644
--- a/src/cpp/client/credentials.cc
+++ b/src/cpp/client/credentials_cc.cc
diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue_cc.cc
index 00cc102f92..00cc102f92 100644
--- a/src/cpp/common/completion_queue.cc
+++ b/src/cpp/common/completion_queue_cc.cc
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server_cc.cc
index af04fd4ca6..af04fd4ca6 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server_cc.cc
diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer_cc.cc
index 91ed66b766..91ed66b766 100644
--- a/src/cpp/util/byte_buffer.cc
+++ b/src/cpp/util/byte_buffer_cc.cc
diff --git a/src/cpp/util/slice.cc b/src/cpp/util/slice_cc.cc
index 7e88423b6c..7e88423b6c 100644
--- a/src/cpp/util/slice.cc
+++ b/src/cpp/util/slice_cc.cc
diff --git a/src/cpp/util/time.cc b/src/cpp/util/time_cc.cc
index c43d848cc6..c43d848cc6 100644
--- a/src/cpp/util/time.cc
+++ b/src/cpp/util/time_cc.cc
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index 3d0947c03d..068bf709b8 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -255,8 +255,10 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length(
}
GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message));
+ intptr_t result = (intptr_t)grpc_byte_buffer_length(reader.buffer_out);
+ grpc_byte_buffer_reader_destroy(&reader);
- return (intptr_t)grpc_byte_buffer_length(reader.buffer_out);
+ return result;
}
/*
@@ -279,6 +281,8 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer(
offset += len;
gpr_slice_unref(slice);
}
+
+ grpc_byte_buffer_reader_destroy(&reader);
}
GPR_EXPORT grpc_status_code GPR_CALLTYPE
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index 05a1d10f6d..eecda4c03a 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -103,6 +103,11 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey";
@synthesize state = _state;
+// TODO(jcanizales): If grpc_init is idempotent, this should be changed from load to initialize.
++ (void)load {
+ grpc_init();
+}
+
- (instancetype)init {
return [self initWithHost:nil path:nil requestsWriter:nil];
}
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 97f6b89340..1339429660 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -245,11 +245,6 @@
}
if (self = [super init]) {
- static dispatch_once_t initialization;
- dispatch_once(&initialization, ^{
- grpc_init();
- });
-
// Each completion queue consumes one thread. There's a trade to be made between creating and
// consuming too many threads and having contention of multiple calls in a single completion
// queue. Currently we use a singleton queue.
diff --git a/src/proto/grpc/testing/echo.proto b/src/proto/grpc/testing/echo.proto
index c596aabfcc..ca60a41b4f 100644
--- a/src/proto/grpc/testing/echo.proto
+++ b/src/proto/grpc/testing/echo.proto
@@ -42,7 +42,7 @@ service EchoTestService {
rpc Unimplemented(EchoRequest) returns (EchoResponse);
}
-service UnimplementedService {
+service UnimplementedEchoService {
rpc Unimplemented(EchoRequest) returns (EchoResponse);
}
diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py
index 513839df7d..faf3ab5f0d 100644
--- a/src/python/grpcio/grpc/__init__.py
+++ b/src/python/grpcio/grpc/__init__.py
@@ -1078,7 +1078,7 @@ def access_token_call_credentials(access_token):
Args:
access_token: A string to place directly in the http request
- authorization header, ie "Authorization: Bearer <access_token>".
+ authorization header, ie "authorization: Bearer <access_token>".
Returns:
A CallCredentials.
@@ -1193,7 +1193,7 @@ def insecure_channel(target, options=None):
def secure_channel(target, credentials, options=None):
- """Creates an insecure Channel to a server.
+ """Creates a secure Channel to a server.
Args:
target: The target to which to connect.
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index 6d65db8306..66c54aa3e0 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -91,6 +91,10 @@ if grpc_config == 'gcov'
$LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic'
end
+if grpc_config == 'dbg'
+ $CFLAGS << ' -O0'
+end
+
$LDFLAGS << ' -Wl,-wrap,memcpy' if RUBY_PLATFORM =~ /linux/
$LDFLAGS << ' -static' if windows