aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-02-06 13:53:12 -0800
committerGravatar Muxi Yan <mxyan@google.com>2017-02-06 13:53:12 -0800
commit703d36879467950cc716e203f47748a2927093b0 (patch)
treec14b47c464e35e0948344ac044077e82cc461d2c /src
parentf24eae2d621f81a800dfcd3da82c193ef9e7b6c3 (diff)
parent7c54d2929c31b00149ec77cd1c753e2175b1f35f (diff)
Merge remote-tracking branch 'upstream/v1.1.x' into automate-objc-version-advancement-v1.1.x
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/lb_policy/grpclb/grpclb.c9
-rw-r--r--src/core/lib/iomgr/resolve_address_uv.c5
-rw-r--r--src/core/lib/iomgr/tcp_client_uv.c14
-rw-r--r--src/core/lib/iomgr/tcp_uv.c1
-rw-r--r--src/core/lib/surface/call.c13
-rw-r--r--src/core/lib/surface/call_log_batch.c8
-rw-r--r--src/core/lib/surface/server.c5
-rw-r--r--src/core/lib/surface/version.c2
-rw-r--r--src/cpp/common/version_cc.cc2
-rw-r--r--src/csharp/Grpc.Auth/project.json4
-rw-r--r--src/csharp/Grpc.Core/VersionInfo.cs4
-rw-r--r--src/csharp/Grpc.Core/project.json2
-rw-r--r--src/csharp/Grpc.HealthCheck/project.json4
-rw-r--r--src/csharp/Grpc.Reflection/project.json4
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.bat2
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.sh4
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c23
-rw-r--r--src/node/ext/call.cc6
-rw-r--r--src/node/health_check/package.json4
-rw-r--r--src/node/src/client.js9
-rw-r--r--src/node/src/server.js32
-rw-r--r--src/node/test/surface_test.js107
-rw-r--r--src/node/tools/package.json2
-rw-r--r--src/objective-c/!ProtoCompiler-gRPCPlugin.podspec2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m2
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m8
-rw-r--r--src/objective-c/GRPCClient/private/version.h2
-rw-r--r--src/objective-c/tests/CronetUnitTests/CronetUnitTests.m6
-rw-r--r--src/php/composer.json2
-rw-r--r--src/php/ext/grpc/call.c9
-rw-r--r--src/python/grpcio/grpc/_channel.py4
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi15
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi7
-rw-r--r--src/python/grpcio/grpc/beta/_server_adaptations.py3
-rw-r--r--src/python/grpcio/grpc/framework/foundation/logging_pool.py5
-rw-r--r--src/python/grpcio/grpc_version.py2
-rw-r--r--src/python/grpcio_health_checking/grpc_version.py2
-rw-r--r--src/python/grpcio_reflection/grpc_version.py2
-rw-r--r--src/python/grpcio_tests/grpc_version.py2
-rw-r--r--src/python/grpcio_tests/tests/interop/methods.py18
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/_channel_test.py3
-rw-r--r--src/ruby/ext/grpc/extconf.rb1
-rw-r--r--src/ruby/ext/grpc/rb_call.c12
-rw-r--r--src/ruby/lib/grpc/version.rb2
-rw-r--r--src/ruby/tools/version.rb2
45 files changed, 262 insertions, 115 deletions
diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c
index 97f98df03a..567e65ac69 100644
--- a/src/core/ext/lb_policy/grpclb/grpclb.c
+++ b/src/core/ext/lb_policy/grpclb/grpclb.c
@@ -1178,14 +1178,15 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
- op->data.recv_initial_metadata = &glb_policy->lb_initial_metadata_recv;
+ op->data.recv_initial_metadata.recv_initial_metadata =
+ &glb_policy->lb_initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
GPR_ASSERT(glb_policy->lb_request_payload != NULL);
op->op = GRPC_OP_SEND_MESSAGE;
- op->data.send_message = glb_policy->lb_request_payload;
+ op->data.send_message.send_message = glb_policy->lb_request_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@@ -1211,7 +1212,7 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
- op->data.recv_message = &glb_policy->lb_response_payload;
+ op->data.recv_message.recv_message = &glb_policy->lb_response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@@ -1293,7 +1294,7 @@ static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg,
if (!glb_policy->shutting_down) {
/* keep listening for serverlist updates */
op->op = GRPC_OP_RECV_MESSAGE;
- op->data.recv_message = &glb_policy->lb_response_payload;
+ op->data.recv_message.recv_message = &glb_policy->lb_response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c
index 9b5f3209f0..79ff910738 100644
--- a/src/core/lib/iomgr/resolve_address_uv.c
+++ b/src/core/lib/iomgr/resolve_address_uv.c
@@ -113,14 +113,15 @@ static grpc_error *try_split_host_port(const char *name,
/* parse name, splitting it into host and port parts */
grpc_error *error;
gpr_split_host_port(name, host, port);
- if (host == NULL) {
+ if (*host == NULL) {
char *msg;
gpr_asprintf(&msg, "unparseable host:port: '%s'", name);
error = GRPC_ERROR_CREATE(msg);
gpr_free(msg);
return error;
}
- if (port == NULL) {
+ if (*port == NULL) {
+ // TODO(murgatroid99): add tests for this case
if (default_port == NULL) {
char *msg;
gpr_asprintf(&msg, "no port in name '%s'", name);
diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c
index 5225a5402b..3de0795187 100644
--- a/src/core/lib/iomgr/tcp_client_uv.c
+++ b/src/core/lib/iomgr/tcp_client_uv.c
@@ -46,6 +46,8 @@
#include "src/core/lib/iomgr/tcp_uv.h"
#include "src/core/lib/iomgr/timer.h"
+extern int grpc_tcp_trace;
+
typedef struct grpc_uv_tcp_connect {
uv_connect_t connect_req;
grpc_timer alarm;
@@ -70,6 +72,12 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
grpc_error *error) {
int done;
grpc_uv_tcp_connect *connect = acp;
+ if (grpc_tcp_trace) {
+ const char *str = grpc_error_string(error);
+ gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: error=%s",
+ connect->addr_name, str);
+ grpc_error_free_string(str);
+ }
if (error == GRPC_ERROR_NONE) {
/* error == NONE implies that the timer ran out, and wasn't cancelled. If
it was cancelled, then the handler that cancelled it also should close
@@ -145,6 +153,12 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
connect->resource_quota = resource_quota;
uv_tcp_init(uv_default_loop(), connect->tcp_handle);
connect->connect_req.data = connect;
+
+ if (grpc_tcp_trace) {
+ gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting",
+ connect->addr_name);
+ }
+
// TODO(murgatroid99): figure out what the return value here means
uv_tcp_connect(&connect->connect_req, connect->tcp_handle,
(const struct sockaddr *)resolved_addr->addr,
diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c
index 3ddc79706b..a1ee597d09 100644
--- a/src/core/lib/iomgr/tcp_uv.c
+++ b/src/core/lib/iomgr/tcp_uv.c
@@ -48,6 +48,7 @@
#include "src/core/lib/iomgr/network_status_tracker.h"
#include "src/core/lib/iomgr/resource_quota.h"
#include "src/core/lib/iomgr/tcp_uv.h"
+#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/support/string.h"
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index 899e8fab3f..cac5737d91 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -1461,7 +1461,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
error = GRPC_CALL_ERROR_INVALID_FLAGS;
goto done_with_error;
}
- if (op->data.send_message == NULL) {
+ if (op->data.send_message.send_message == NULL) {
error = GRPC_CALL_ERROR_INVALID_MESSAGE;
goto done_with_error;
}
@@ -1473,11 +1473,13 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
call->sending_message = 1;
grpc_slice_buffer_stream_init(
&call->sending_stream,
- &op->data.send_message->data.raw.slice_buffer, op->flags);
+ &op->data.send_message.send_message->data.raw.slice_buffer,
+ op->flags);
/* If the outgoing buffer is already compressed, mark it as so in the
flags. These will be picked up by the compression filter and further
(wasteful) attempts at compression skipped. */
- if (op->data.send_message->data.raw.compression > GRPC_COMPRESS_NONE) {
+ if (op->data.send_message.send_message->data.raw.compression >
+ GRPC_COMPRESS_NONE) {
call->sending_stream.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS;
}
stream_op->send_message = &call->sending_stream.base;
@@ -1565,7 +1567,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
that case we're not necessarily covered by a poller. */
stream_op->covered_by_poller = call->is_client;
call->received_initial_metadata = 1;
- call->buffered_metadata[0] = op->data.recv_initial_metadata;
+ call->buffered_metadata[0] =
+ op->data.recv_initial_metadata.recv_initial_metadata;
grpc_closure_init(&call->receiving_initial_metadata_ready,
receiving_initial_metadata_ready, bctl,
grpc_schedule_on_exec_ctx);
@@ -1588,7 +1591,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
}
call->receiving_message = 1;
bctl->recv_message = 1;
- call->receiving_buffer = op->data.recv_message;
+ call->receiving_buffer = op->data.recv_message.recv_message;
stream_op->recv_message = &call->receiving_stream;
grpc_closure_init(&call->receiving_stream_ready, receiving_stream_ready,
bctl, grpc_schedule_on_exec_ctx);
diff --git a/src/core/lib/surface/call_log_batch.c b/src/core/lib/surface/call_log_batch.c
index 31c074f15d..61b73a138f 100644
--- a/src/core/lib/surface/call_log_batch.c
+++ b/src/core/lib/surface/call_log_batch.c
@@ -63,7 +63,8 @@ char *grpc_op_string(const grpc_op *op) {
op->data.send_initial_metadata.count);
break;
case GRPC_OP_SEND_MESSAGE:
- gpr_asprintf(&tmp, "SEND_MESSAGE ptr=%p", op->data.send_message);
+ gpr_asprintf(&tmp, "SEND_MESSAGE ptr=%p",
+ op->data.send_message.send_message);
gpr_strvec_add(&b, tmp);
break;
case GRPC_OP_SEND_CLOSE_FROM_CLIENT:
@@ -79,11 +80,12 @@ char *grpc_op_string(const grpc_op *op) {
break;
case GRPC_OP_RECV_INITIAL_METADATA:
gpr_asprintf(&tmp, "RECV_INITIAL_METADATA ptr=%p",
- op->data.recv_initial_metadata);
+ op->data.recv_initial_metadata.recv_initial_metadata);
gpr_strvec_add(&b, tmp);
break;
case GRPC_OP_RECV_MESSAGE:
- gpr_asprintf(&tmp, "RECV_MESSAGE ptr=%p", op->data.recv_message);
+ gpr_asprintf(&tmp, "RECV_MESSAGE ptr=%p",
+ op->data.recv_message.recv_message);
gpr_strvec_add(&b, tmp);
break;
case GRPC_OP_RECV_STATUS_ON_CLIENT:
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index addb7c4fbc..9e916465be 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -609,7 +609,7 @@ static void finish_start_new_rpc(
grpc_op op;
memset(&op, 0, sizeof(op));
op.op = GRPC_OP_RECV_MESSAGE;
- op.data.recv_message = &calld->payload;
+ op.data.recv_message.recv_message = &calld->payload;
grpc_closure_init(&calld->publish, publish_new_rpc, elem,
grpc_schedule_on_exec_ctx);
grpc_call_start_batch_and_execute(exec_ctx, calld->call, &op, 1,
@@ -857,7 +857,8 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd,
grpc_op op;
memset(&op, 0, sizeof(op));
op.op = GRPC_OP_RECV_INITIAL_METADATA;
- op.data.recv_initial_metadata = &calld->initial_metadata;
+ op.data.recv_initial_metadata.recv_initial_metadata =
+ &calld->initial_metadata;
grpc_closure_init(&calld->got_initial_metadata, got_initial_metadata, elem,
grpc_schedule_on_exec_ctx);
grpc_call_start_batch_and_execute(exec_ctx, call, &op, 1,
diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c
index 6ab1a84f35..ed6fd96b4a 100644
--- a/src/core/lib/surface/version.c
+++ b/src/core/lib/surface/version.c
@@ -36,6 +36,6 @@
#include <grpc/grpc.h>
-const char *grpc_version_string(void) { return "2.0.0-pre1"; }
+const char *grpc_version_string(void) { return "2.0.0"; }
const char *grpc_g_stands_for(void) { return "good"; }
diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc
index 1a35e2c243..446e94379d 100644
--- a/src/cpp/common/version_cc.cc
+++ b/src/cpp/common/version_cc.cc
@@ -37,5 +37,5 @@
#include <grpc++/grpc++.h>
namespace grpc {
-grpc::string Version() { return "1.1.0-pre1"; }
+grpc::string Version() { return "1.1.1"; }
}
diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json
index b83aa9ab7e..c830ec49fd 100644
--- a/src/csharp/Grpc.Auth/project.json
+++ b/src/csharp/Grpc.Auth/project.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.0-pre1",
+ "version": "1.1.1",
"title": "gRPC C# Auth",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2015, Google Inc.",
@@ -21,7 +21,7 @@
}
},
"dependencies": {
- "Grpc.Core": "1.1.0-pre1",
+ "Grpc.Core": "1.1.1",
"Google.Apis.Auth": "1.16.0"
},
"frameworks": {
diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs
index 46bbe9b4a8..5fb976fc88 100644
--- a/src/csharp/Grpc.Core/VersionInfo.cs
+++ b/src/csharp/Grpc.Core/VersionInfo.cs
@@ -48,11 +48,11 @@ namespace Grpc.Core
/// <summary>
/// Current <c>AssemblyFileVersion</c> of gRPC C# assemblies
/// </summary>
- public const string CurrentAssemblyFileVersion = "1.1.0.0";
+ public const string CurrentAssemblyFileVersion = "1.1.1.0";
/// <summary>
/// Current version of gRPC C#
/// </summary>
- public const string CurrentVersion = "1.1.0-pre1";
+ public const string CurrentVersion = "1.1.1";
}
}
diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json
index 2cd678b3b1..228b227a3b 100644
--- a/src/csharp/Grpc.Core/project.json
+++ b/src/csharp/Grpc.Core/project.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.0-pre1",
+ "version": "1.1.1",
"title": "gRPC C# Core",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2015, Google Inc.",
diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json
index d34335e596..859ff5ea03 100644
--- a/src/csharp/Grpc.HealthCheck/project.json
+++ b/src/csharp/Grpc.HealthCheck/project.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.0-pre1",
+ "version": "1.1.1",
"title": "gRPC C# Healthchecking",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2015, Google Inc.",
@@ -21,7 +21,7 @@
}
},
"dependencies": {
- "Grpc.Core": "1.1.0-pre1",
+ "Grpc.Core": "1.1.1",
"Google.Protobuf": "3.0.0"
},
"frameworks": {
diff --git a/src/csharp/Grpc.Reflection/project.json b/src/csharp/Grpc.Reflection/project.json
index c10125457e..8b83d48adb 100644
--- a/src/csharp/Grpc.Reflection/project.json
+++ b/src/csharp/Grpc.Reflection/project.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.0-pre1",
+ "version": "1.1.1",
"title": "gRPC C# Reflection",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2016, Google Inc.",
@@ -21,7 +21,7 @@
}
},
"dependencies": {
- "Grpc.Core": "1.1.0-pre1",
+ "Grpc.Core": "1.1.1",
"Google.Protobuf": "3.0.0"
},
"frameworks": {
diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat
index 9e4b066443..d3da8cf211 100755
--- a/src/csharp/build_packages_dotnetcli.bat
+++ b/src/csharp/build_packages_dotnetcli.bat
@@ -28,7 +28,7 @@
@rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@rem Current package versions
-set VERSION=1.1.0-pre1
+set VERSION=1.1.1
set PROTOBUF_VERSION=3.0.0
@rem Adjust the location of nuget.exe
diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh
index e9bb42bd5c..5fa0b54ad0 100755
--- a/src/csharp/build_packages_dotnetcli.sh
+++ b/src/csharp/build_packages_dotnetcli.sh
@@ -65,7 +65,7 @@ dotnet pack --configuration Release Grpc.Auth/project.json --output ../../artifa
dotnet pack --configuration Release Grpc.HealthCheck/project.json --output ../../artifacts
dotnet pack --configuration Release Grpc.Reflection/project.json --output ../../artifacts
-nuget pack Grpc.nuspec -Version "1.1.0-pre1" -OutputDirectory ../../artifacts
-nuget pack Grpc.Tools.nuspec -Version "1.1.0-pre1" -OutputDirectory ../../artifacts
+nuget pack Grpc.nuspec -Version "1.1.1" -OutputDirectory ../../artifacts
+nuget pack Grpc.Tools.nuspec -Version "1.1.1" -OutputDirectory ../../artifacts
(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index 946f5872c0..7239606c64 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -537,7 +537,7 @@ grpcsharp_call_start_unary(grpc_call *call, grpcsharp_batch_context *ctx,
ops[1].op = GRPC_OP_SEND_MESSAGE;
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len);
- ops[1].data.send_message = ctx->send_message;
+ ops[1].data.send_message.send_message = ctx->send_message;
ops[1].flags = write_flags;
ops[1].reserved = NULL;
@@ -546,12 +546,13 @@ grpcsharp_call_start_unary(grpc_call *call, grpcsharp_batch_context *ctx,
ops[2].reserved = NULL;
ops[3].op = GRPC_OP_RECV_INITIAL_METADATA;
- ops[3].data.recv_initial_metadata = &(ctx->recv_initial_metadata);
+ ops[3].data.recv_initial_metadata.recv_initial_metadata =
+ &(ctx->recv_initial_metadata);
ops[3].flags = 0;
ops[3].reserved = NULL;
ops[4].op = GRPC_OP_RECV_MESSAGE;
- ops[4].data.recv_message = &(ctx->recv_message);
+ ops[4].data.recv_message.recv_message = &(ctx->recv_message);
ops[4].flags = 0;
ops[4].reserved = NULL;
@@ -590,12 +591,13 @@ grpcsharp_call_start_client_streaming(grpc_call *call,
ops[0].reserved = NULL;
ops[1].op = GRPC_OP_RECV_INITIAL_METADATA;
- ops[1].data.recv_initial_metadata = &(ctx->recv_initial_metadata);
+ ops[1].data.recv_initial_metadata.recv_initial_metadata =
+ &(ctx->recv_initial_metadata);
ops[1].flags = 0;
ops[1].reserved = NULL;
ops[2].op = GRPC_OP_RECV_MESSAGE;
- ops[2].data.recv_message = &(ctx->recv_message);
+ ops[2].data.recv_message.recv_message = &(ctx->recv_message);
ops[2].flags = 0;
ops[2].reserved = NULL;
@@ -634,7 +636,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming(
ops[1].op = GRPC_OP_SEND_MESSAGE;
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len);
- ops[1].data.send_message = ctx->send_message;
+ ops[1].data.send_message.send_message = ctx->send_message;
ops[1].flags = write_flags;
ops[1].reserved = NULL;
@@ -698,7 +700,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_recv_initial_metadata(
/* TODO: don't use magic number */
grpc_op ops[1];
ops[0].op = GRPC_OP_RECV_INITIAL_METADATA;
- ops[0].data.recv_initial_metadata = &(ctx->recv_initial_metadata);
+ ops[0].data.recv_initial_metadata.recv_initial_metadata =
+ &(ctx->recv_initial_metadata);
ops[0].flags = 0;
ops[0].reserved = NULL;
@@ -717,7 +720,7 @@ grpcsharp_call_send_message(grpc_call *call, grpcsharp_batch_context *ctx,
size_t nops = send_empty_initial_metadata ? 2 : 1;
ops[0].op = GRPC_OP_SEND_MESSAGE;
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len);
- ops[0].data.send_message = ctx->send_message;
+ ops[0].data.send_message.send_message = ctx->send_message;
ops[0].flags = write_flags;
ops[0].reserved = NULL;
ops[1].op = GRPC_OP_SEND_INITIAL_METADATA;
@@ -765,7 +768,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server(
ops[nops].op = GRPC_OP_SEND_MESSAGE;
ctx->send_message = string_to_byte_buffer(optional_send_buffer,
optional_send_buffer_len);
- ops[nops].data.send_message = ctx->send_message;
+ ops[nops].data.send_message.send_message = ctx->send_message;
ops[nops].flags = write_flags;
ops[nops].reserved = NULL;
nops ++;
@@ -784,7 +787,7 @@ grpcsharp_call_recv_message(grpc_call *call, grpcsharp_batch_context *ctx) {
/* TODO: don't use magic number */
grpc_op ops[1];
ops[0].op = GRPC_OP_RECV_MESSAGE;
- ops[0].data.recv_message = &(ctx->recv_message);
+ ops[0].data.recv_message.recv_message = &(ctx->recv_message);
ops[0].flags = 0;
ops[0].reserved = NULL;
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx,
diff --git a/src/node/ext/call.cc b/src/node/ext/call.cc
index 191e763e0e..96f66a48d2 100644
--- a/src/node/ext/call.cc
+++ b/src/node/ext/call.cc
@@ -262,7 +262,7 @@ class SendMessageOp : public Op {
}
}
send_message = BufferToByteBuffer(value);
- out->data.send_message = send_message;
+ out->data.send_message.send_message = send_message;
PersistentValue *handle = new PersistentValue(value);
resources->handles.push_back(unique_ptr<PersistentValue>(handle));
return true;
@@ -377,7 +377,7 @@ class GetMetadataOp : public Op {
bool ParseOp(Local<Value> value, grpc_op *out,
shared_ptr<Resources> resources) {
- out->data.recv_initial_metadata = &recv_metadata;
+ out->data.recv_initial_metadata.recv_initial_metadata = &recv_metadata;
return true;
}
bool IsFinalOp() {
@@ -410,7 +410,7 @@ class ReadMessageOp : public Op {
bool ParseOp(Local<Value> value, grpc_op *out,
shared_ptr<Resources> resources) {
- out->data.recv_message = &recv_message;
+ out->data.recv_message.recv_message = &recv_message;
return true;
}
bool IsFinalOp() {
diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json
index c67f6d4c8b..1a59c101dd 100644
--- a/src/node/health_check/package.json
+++ b/src/node/health_check/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc-health-check",
- "version": "1.1.0-pre1",
+ "version": "1.1.1",
"author": "Google Inc.",
"description": "Health check service for use with gRPC",
"repository": {
@@ -15,7 +15,7 @@
}
],
"dependencies": {
- "grpc": "^1.1.0-pre1",
+ "grpc": "^1.1.1",
"lodash": "^3.9.3",
"google-protobuf": "^3.0.0"
},
diff --git a/src/node/src/client.js b/src/node/src/client.js
index 134ef239c2..44081a3a6c 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -108,7 +108,7 @@ function _write(chunk, encoding, callback) {
but passing an object that causes a serialization failure is a misuse
of the API anyway, so that's OK. The primary purpose here is to give the
programmer a useful error and to stop the stream properly */
- this.call.cancelWithStatus(grpc.status.INTERNAL, "Serialization failure");
+ this.call.cancelWithStatus(grpc.status.INTERNAL, 'Serialization failure');
callback(e);
}
if (_.isFinite(encoding)) {
@@ -831,13 +831,12 @@ exports.waitForClientReady = function(client, deadline, callback) {
*/
exports.makeProtobufClientConstructor = function(service, options) {
var method_attrs = common.getProtobufServiceAttrs(service, options);
- var deprecatedArgumentOrder = false;
- if (options) {
- deprecatedArgumentOrder = options.deprecatedArgumentOrder;
+ if (!options) {
+ options = {deprecatedArgumentOrder: false};
}
var Client = exports.makeClientConstructor(
method_attrs, common.fullyQualifiedName(service),
- deprecatedArgumentOrder);
+ options);
Client.service = service;
Client.service.grpc_options = options;
return Client;
diff --git a/src/node/src/server.js b/src/node/src/server.js
index da9c6b2d7f..8a7eff507d 100644
--- a/src/node/src/server.js
+++ b/src/node/src/server.js
@@ -121,20 +121,20 @@ function sendUnaryResponse(call, value, serialize, metadata, flags) {
if (metadata) {
statusMetadata = metadata;
}
- status.metadata = statusMetadata._getCoreRepresentation();
- if (!call.metadataSent) {
- end_batch[grpc.opType.SEND_INITIAL_METADATA] =
- (new Metadata())._getCoreRepresentation();
- call.metadataSent = true;
- }
var message;
try {
message = serialize(value);
} catch (e) {
e.code = grpc.status.INTERNAL;
- handleError(e);
+ handleError(call, e);
return;
}
+ status.metadata = statusMetadata._getCoreRepresentation();
+ if (!call.metadataSent) {
+ end_batch[grpc.opType.SEND_INITIAL_METADATA] =
+ (new Metadata())._getCoreRepresentation();
+ call.metadataSent = true;
+ }
message.grpcWriteFlags = flags;
end_batch[grpc.opType.SEND_MESSAGE] = message;
end_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = status;
@@ -280,11 +280,6 @@ function _write(chunk, encoding, callback) {
/* jshint validthis: true */
var batch = {};
var self = this;
- if (!this.call.metadataSent) {
- batch[grpc.opType.SEND_INITIAL_METADATA] =
- (new Metadata())._getCoreRepresentation();
- this.call.metadataSent = true;
- }
var message;
try {
message = this.serialize(chunk);
@@ -293,6 +288,11 @@ function _write(chunk, encoding, callback) {
callback(e);
return;
}
+ if (!this.call.metadataSent) {
+ batch[grpc.opType.SEND_INITIAL_METADATA] =
+ (new Metadata())._getCoreRepresentation();
+ this.call.metadataSent = true;
+ }
if (_.isFinite(encoding)) {
/* Attach the encoding if it is a finite number. This is the closest we
* can get to checking that it is valid flags */
@@ -728,11 +728,17 @@ var defaultHandler = {
* method implementation for the provided service.
*/
Server.prototype.addService = function(service, implementation) {
+ if (!_.isObjectLike(service) || !_.isObjectLike(implementation)) {
+ throw new Error('addService requires two objects as arguments');
+ }
+ if (_.keys(service).length === 0) {
+ throw new Error('Cannot add an empty service to a server');
+ }
if (this.started) {
throw new Error('Can\'t add a service to a started server.');
}
var self = this;
- _.each(service, function(attrs, name) {
+ _.forOwn(service, function(attrs, name) {
var method_type;
if (attrs.requestStream) {
if (attrs.responseStream) {
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js
index e429a3648b..2636ea85ac 100644
--- a/src/node/test/surface_test.js
+++ b/src/node/test/surface_test.js
@@ -607,6 +607,113 @@ describe('Client malformed response handling', function() {
call.end();
});
});
+describe('Server serialization failure handling', function() {
+ function serializeFail(obj) {
+ throw new Error('Serialization failed');
+ }
+ var client;
+ var server;
+ before(function() {
+ var test_proto = ProtoBuf.loadProtoFile(__dirname + '/test_service.proto');
+ var test_service = test_proto.lookup('TestService');
+ var malformed_test_service = {
+ unary: {
+ path: '/TestService/Unary',
+ requestStream: false,
+ responseStream: false,
+ requestDeserialize: _.identity,
+ responseSerialize: serializeFail
+ },
+ clientStream: {
+ path: '/TestService/ClientStream',
+ requestStream: true,
+ responseStream: false,
+ requestDeserialize: _.identity,
+ responseSerialize: serializeFail
+ },
+ serverStream: {
+ path: '/TestService/ServerStream',
+ requestStream: false,
+ responseStream: true,
+ requestDeserialize: _.identity,
+ responseSerialize: serializeFail
+ },
+ bidiStream: {
+ path: '/TestService/BidiStream',
+ requestStream: true,
+ responseStream: true,
+ requestDeserialize: _.identity,
+ responseSerialize: serializeFail
+ }
+ };
+ server = new grpc.Server();
+ server.addService(malformed_test_service, {
+ unary: function(call, cb) {
+ cb(null, {});
+ },
+ clientStream: function(stream, cb) {
+ stream.on('data', function() {/* Ignore requests */});
+ stream.on('end', function() {
+ cb(null, {});
+ });
+ },
+ serverStream: function(stream) {
+ stream.write({});
+ stream.end();
+ },
+ bidiStream: function(stream) {
+ stream.on('data', function() {
+ // Ignore requests
+ stream.write({});
+ });
+ stream.on('end', function() {
+ stream.end();
+ });
+ }
+ });
+ var port = server.bind('localhost:0', server_insecure_creds);
+ var Client = surface_client.makeProtobufClientConstructor(test_service);
+ client = new Client('localhost:' + port, grpc.credentials.createInsecure());
+ server.start();
+ });
+ after(function() {
+ server.forceShutdown();
+ });
+ it('should get an INTERNAL status with a unary call', function(done) {
+ client.unary({}, function(err, data) {
+ assert(err);
+ assert.strictEqual(err.code, grpc.status.INTERNAL);
+ done();
+ });
+ });
+ it('should get an INTERNAL status with a client stream call', function(done) {
+ var call = client.clientStream(function(err, data) {
+ assert(err);
+ assert.strictEqual(err.code, grpc.status.INTERNAL);
+ done();
+ });
+ call.write({});
+ call.end();
+ });
+ it('should get an INTERNAL status with a server stream call', function(done) {
+ var call = client.serverStream({});
+ call.on('data', function(){});
+ call.on('error', function(err) {
+ assert.strictEqual(err.code, grpc.status.INTERNAL);
+ done();
+ });
+ });
+ it('should get an INTERNAL status with a bidi stream call', function(done) {
+ var call = client.bidiStream();
+ call.on('data', function(){});
+ call.on('error', function(err) {
+ assert.strictEqual(err.code, grpc.status.INTERNAL);
+ done();
+ });
+ call.write({});
+ call.end();
+ });
+});
describe('Other conditions', function() {
var test_service;
var Client;
diff --git a/src/node/tools/package.json b/src/node/tools/package.json
index b99628a52a..c2c39aeef0 100644
--- a/src/node/tools/package.json
+++ b/src/node/tools/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc-tools",
- "version": "1.1.0-pre1",
+ "version": "1.1.1",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "http://www.grpc.io/",
diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
index 546c3f3eb1..1cc7398880 100644
--- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
+++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCPlugin'
- v = '1.1.0-pre1'
+ v = '1.1.1'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
s.description = <<-DESC
diff --git a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m
index 40afca2d3d..0e2fa13f2c 100644
--- a/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m
+++ b/src/objective-c/GRPCClient/private/GRPCConnectivityMonitor.m
@@ -159,11 +159,13 @@ static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target,
if (strongSelf) {
if (lossHandler && !flags.reachable) {
lossHandler();
+#if TARGET_OS_IPHONE
} else if (wifiStatusChangeHandler &&
strongSelf->_previousReachabilityFlags &&
(flags.isWWAN ^
strongSelf->_previousReachabilityFlags.isWWAN)) {
wifiStatusChangeHandler();
+#endif
}
strongSelf->_previousReachabilityFlags = flags;
}
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 38fcae0299..45d0aae203 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -105,14 +105,14 @@
}
if (self = [super init]) {
_op.op = GRPC_OP_SEND_MESSAGE;
- _op.data.send_message = message.grpc_byteBuffer;
+ _op.data.send_message.send_message = message.grpc_byteBuffer;
_handler = handler;
}
return self;
}
- (void)dealloc {
- grpc_byte_buffer_destroy(_op.data.send_message);
+ grpc_byte_buffer_destroy(_op.data.send_message.send_message);
}
@end
@@ -145,7 +145,7 @@
if (self = [super init]) {
_op.op = GRPC_OP_RECV_INITIAL_METADATA;
grpc_metadata_array_init(&_headers);
- _op.data.recv_initial_metadata = &_headers;
+ _op.data.recv_initial_metadata.recv_initial_metadata = &_headers;
if (handler) {
// Prevent reference cycle with _handler
__weak typeof(self) weakSelf = self;
@@ -177,7 +177,7 @@
- (instancetype)initWithHandler:(void (^)(grpc_byte_buffer *))handler {
if (self = [super init]) {
_op.op = GRPC_OP_RECV_MESSAGE;
- _op.data.recv_message = &_receivedMessage;
+ _op.data.recv_message.recv_message = &_receivedMessage;
if (handler) {
// Prevent reference cycle with _handler
__weak typeof(self) weakSelf = self;
diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h
index 1ce35ebc83..28232aea0b 100644
--- a/src/objective-c/GRPCClient/private/version.h
+++ b/src/objective-c/GRPCClient/private/version.h
@@ -38,4 +38,4 @@
// `tools/buildgen/generate_projects.sh`.
-#define GRPC_OBJC_VERSION_STRING @"1.1.0-pre1"
+#define GRPC_OBJC_VERSION_STRING @"1.1.1"
diff --git a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
index dbd28076dd..43b91a072b 100644
--- a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
+++ b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
@@ -142,7 +142,7 @@ static void drain_cq(grpc_completion_queue *cq) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
- op->data.send_message = request_payload;
+ op->data.send_message.send_message = request_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@@ -151,12 +151,12 @@ static void drain_cq(grpc_completion_queue *cq) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
- op->data.recv_initial_metadata = &initial_metadata_recv;
+ op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
- op->data.recv_message = &response_payload_recv;
+ op->data.recv_message.recv_message = &response_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
diff --git a/src/php/composer.json b/src/php/composer.json
index 2d5d555bc2..0273139684 100644
--- a/src/php/composer.json
+++ b/src/php/composer.json
@@ -5,7 +5,7 @@
"keywords": ["rpc"],
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",
- "version": "1.1.0",
+ "version": "1.1.1",
"require": {
"php": ">=5.5.0",
"ext-grpc": "*",
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index 64b1137c2a..be11e63d62 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -335,7 +335,7 @@ PHP_METHOD(Call, startBatch) {
1 TSRMLS_CC);
goto cleanup;
}
- ops[op_num].data.send_message =
+ ops[op_num].data.send_message.send_message =
string_to_byte_buffer(Z_STRVAL_P(message_value),
Z_STRLEN_P(message_value));
break;
@@ -390,10 +390,11 @@ PHP_METHOD(Call, startBatch) {
}
break;
case GRPC_OP_RECV_INITIAL_METADATA:
- ops[op_num].data.recv_initial_metadata = &recv_metadata;
+ ops[op_num].data.recv_initial_metadata.recv_initial_metadata =
+ &recv_metadata;
break;
case GRPC_OP_RECV_MESSAGE:
- ops[op_num].data.recv_message = &message;
+ ops[op_num].data.recv_message.recv_message = &message;
break;
case GRPC_OP_RECV_STATUS_ON_CLIENT:
ops[op_num].data.recv_status_on_client.trailing_metadata =
@@ -498,7 +499,7 @@ cleanup:
}
for (int i = 0; i < op_num; i++) {
if (ops[i].op == GRPC_OP_SEND_MESSAGE) {
- grpc_byte_buffer_destroy(ops[i].data.send_message);
+ grpc_byte_buffer_destroy(ops[i].data.send_message.send_message);
}
if (ops[i].op == GRPC_OP_RECV_MESSAGE) {
grpc_byte_buffer_destroy(message);
diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py
index 5a8a3d487a..77412236cc 100644
--- a/src/python/grpcio/grpc/_channel.py
+++ b/src/python/grpcio/grpc/_channel.py
@@ -842,8 +842,8 @@ def _poll_connectivity(state, channel, initial_try_to_connect):
connectivity = channel.check_connectivity_state(try_to_connect)
with state.lock:
state.connectivity = (
- _common.
- CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY[connectivity])
+ _common.CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY[
+ connectivity])
callbacks = tuple(callback
for callback, unused_but_known_to_be_none_connectivity
in state.callbacks_and_connectivities)
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
index ad766186bd..348d42cb0b 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
@@ -279,12 +279,21 @@ cdef extern from "grpc/grpc.h":
ctypedef struct grpc_op_data_recv_close_on_server:
int *cancelled
+ ctypedef struct grpc_op_data_send_message:
+ grpc_byte_buffer *send_message
+
+ ctypedef struct grpc_op_data_receive_message:
+ grpc_byte_buffer **receive_message "recv_message"
+
+ ctypedef struct grpc_op_data_receive_initial_metadata:
+ grpc_metadata_array *receive_initial_metadata "recv_initial_metadata"
+
union grpc_op_data:
grpc_op_data_send_initial_metadata send_initial_metadata
- grpc_byte_buffer *send_message
+ grpc_op_data_send_message send_message
grpc_op_data_send_status_from_server send_status_from_server
- grpc_metadata_array *receive_initial_metadata "recv_initial_metadata"
- grpc_byte_buffer **receive_message "recv_message"
+ grpc_op_data_receive_initial_metadata receive_initial_metadata "recv_initial_metadata"
+ grpc_op_data_receive_message receive_message "recv_message"
grpc_op_data_recv_status_on_client receive_status_on_client "recv_status_on_client"
grpc_op_data_recv_close_on_server receive_close_on_server "recv_close_on_server"
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
index 69b837c4db..07385129ef 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
@@ -606,7 +606,7 @@ def operation_send_message(data, int flags):
op.c_op.type = GRPC_OP_SEND_MESSAGE
op.c_op.flags = flags
byte_buffer = ByteBuffer(data)
- op.c_op.data.send_message = byte_buffer.c_byte_buffer
+ op.c_op.data.send_message.send_message = byte_buffer.c_byte_buffer
op.references.append(byte_buffer)
op.is_valid = True
return op
@@ -639,7 +639,7 @@ def operation_receive_initial_metadata(int flags):
op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA
op.c_op.flags = flags
op._received_metadata = Metadata([])
- op.c_op.data.receive_initial_metadata = (
+ op.c_op.data.receive_initial_metadata.receive_initial_metadata = (
&op._received_metadata.c_metadata_array)
op.is_valid = True
return op
@@ -652,7 +652,8 @@ def operation_receive_message(int flags):
# n.b. the c_op.data.receive_message field needs to be deleted by us,
# anyway, so we just let that be handled by the ByteBuffer() we allocated
# the line before.
- op.c_op.data.receive_message = &op._received_message.c_byte_buffer
+ op.c_op.data.receive_message.receive_message = (
+ &op._received_message.c_byte_buffer)
op.is_valid = True
return op
diff --git a/src/python/grpcio/grpc/beta/_server_adaptations.py b/src/python/grpcio/grpc/beta/_server_adaptations.py
index bb7c0960d5..206bd7e468 100644
--- a/src/python/grpcio/grpc/beta/_server_adaptations.py
+++ b/src/python/grpcio/grpc/beta/_server_adaptations.py
@@ -393,5 +393,4 @@ def server(service_implementations, multi_method_implementation,
else:
effective_thread_pool = thread_pool
return _Server(
- grpc.server(
- effective_thread_pool, handlers=(generic_rpc_handler,)))
+ grpc.server(effective_thread_pool, handlers=(generic_rpc_handler,)))
diff --git a/src/python/grpcio/grpc/framework/foundation/logging_pool.py b/src/python/grpcio/grpc/framework/foundation/logging_pool.py
index 9164173d34..7ee37373fa 100644
--- a/src/python/grpcio/grpc/framework/foundation/logging_pool.py
+++ b/src/python/grpcio/grpc/framework/foundation/logging_pool.py
@@ -64,9 +64,8 @@ class _LoggingPool(object):
return self._backing_pool.submit(_wrap(fn), *args, **kwargs)
def map(self, func, *iterables, **kwargs):
- return self._backing_pool.map(_wrap(func),
- *iterables,
- timeout=kwargs.get('timeout', None))
+ return self._backing_pool.map(
+ _wrap(func), *iterables, timeout=kwargs.get('timeout', None))
def shutdown(self, wait=True):
self._backing_pool.shutdown(wait=wait)
diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py
index 9642427ab5..e3d8d927f7 100644
--- a/src/python/grpcio/grpc_version.py
+++ b/src/python/grpcio/grpc_version.py
@@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!!
-VERSION='1.1.0rc1'
+VERSION='1.1.1'
diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py
index 24971c0772..0a9fd1c251 100644
--- a/src/python/grpcio_health_checking/grpc_version.py
+++ b/src/python/grpcio_health_checking/grpc_version.py
@@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!!
-VERSION='1.1.0rc1'
+VERSION='1.1.1'
diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py
index b8145fcfaa..4d01b4b2b0 100644
--- a/src/python/grpcio_reflection/grpc_version.py
+++ b/src/python/grpcio_reflection/grpc_version.py
@@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!!
-VERSION='1.1.0rc1'
+VERSION='1.1.1'
diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py
index 24536b634e..22c7f9accb 100644
--- a/src/python/grpcio_tests/grpc_version.py
+++ b/src/python/grpcio_tests/grpc_version.py
@@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!!
-VERSION='1.1.0rc1'
+VERSION='1.1.1'
diff --git a/src/python/grpcio_tests/tests/interop/methods.py b/src/python/grpcio_tests/tests/interop/methods.py
index bdb258591e..1f9b356eb2 100644
--- a/src/python/grpcio_tests/tests/interop/methods.py
+++ b/src/python/grpcio_tests/tests/interop/methods.py
@@ -351,8 +351,7 @@ def _status_code_and_message(stub):
response_type=messages_pb2.COMPRESSABLE,
response_size=1,
payload=messages_pb2.Payload(body=b'\x00'),
- response_status=messages_pb2.EchoStatus(
- code=code, message=details))
+ response_status=messages_pb2.EchoStatus(code=code, message=details))
response_future = stub.UnaryCall.future(request)
_validate_status_code_and_details(response_future, status, details)
@@ -363,8 +362,7 @@ def _status_code_and_message(stub):
response_type=messages_pb2.COMPRESSABLE,
response_parameters=(messages_pb2.ResponseParameters(size=1),),
payload=messages_pb2.Payload(body=b'\x00'),
- response_status=messages_pb2.EchoStatus(
- code=code, message=details))
+ response_status=messages_pb2.EchoStatus(code=code, message=details))
pipe.add(request) # sends the initial request.
# Dropping out of with block closes the pipe
_validate_status_code_and_details(response_iterator, status, details)
@@ -428,8 +426,8 @@ def _compute_engine_creds(stub, args):
def _oauth2_auth_token(stub, args):
- json_key_filename = os.environ[oauth2client_client.
- GOOGLE_APPLICATION_CREDENTIALS]
+ json_key_filename = os.environ[
+ oauth2client_client.GOOGLE_APPLICATION_CREDENTIALS]
wanted_email = json.load(open(json_key_filename, 'rb'))['client_email']
response = _large_unary_common_behavior(stub, True, True, None)
if wanted_email != response.username:
@@ -441,8 +439,8 @@ def _oauth2_auth_token(stub, args):
def _jwt_token_creds(stub, args):
- json_key_filename = os.environ[oauth2client_client.
- GOOGLE_APPLICATION_CREDENTIALS]
+ json_key_filename = os.environ[
+ oauth2client_client.GOOGLE_APPLICATION_CREDENTIALS]
wanted_email = json.load(open(json_key_filename, 'rb'))['client_email']
response = _large_unary_common_behavior(stub, True, False, None)
if wanted_email != response.username:
@@ -451,8 +449,8 @@ def _jwt_token_creds(stub, args):
def _per_rpc_creds(stub, args):
- json_key_filename = os.environ[oauth2client_client.
- GOOGLE_APPLICATION_CREDENTIALS]
+ json_key_filename = os.environ[
+ oauth2client_client.GOOGLE_APPLICATION_CREDENTIALS]
wanted_email = json.load(open(json_key_filename, 'rb'))['client_email']
credentials = oauth2client_client.GoogleCredentials.get_application_default()
scoped_credentials = credentials.create_scoped([args.oauth_scope])
diff --git a/src/python/grpcio_tests/tests/unit/_cython/_channel_test.py b/src/python/grpcio_tests/tests/unit/_cython/_channel_test.py
index 0ca06868b2..5c7f903015 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/_channel_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/_channel_test.py
@@ -59,8 +59,7 @@ def _create_loop_destroy():
def _in_parallel(behavior, arguments):
threads = tuple(
- threading.Thread(
- target=behavior, args=arguments)
+ threading.Thread(target=behavior, args=arguments)
for _ in range(test_constants.THREAD_CONCURRENCY))
for thread in threads:
thread.start()
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index 66c54aa3e0..b379664bab 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -102,7 +102,6 @@ $CFLAGS << ' -std=c99 '
$CFLAGS << ' -Wall '
$CFLAGS << ' -Wextra '
$CFLAGS << ' -pedantic '
-$CFLAGS << ' -Werror '
$CFLAGS << ' -Wno-format '
output = File.join('grpc', 'grpc_c')
diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c
index 67a42af619..fbc68c4e59 100644
--- a/src/ruby/ext/grpc/rb_call.c
+++ b/src/ruby/ext/grpc/rb_call.c
@@ -641,7 +641,7 @@ static void grpc_run_batch_stack_cleanup(run_batch_stack *st) {
for (i = 0; i < st->op_num; i++) {
if (st->ops[i].op == GRPC_OP_SEND_MESSAGE) {
- grpc_byte_buffer_destroy(st->ops[i].data.send_message);
+ grpc_byte_buffer_destroy(st->ops[i].data.send_message.send_message);
}
}
}
@@ -673,8 +673,9 @@ static void grpc_run_batch_stack_fill_ops(run_batch_stack *st, VALUE ops_hash) {
st->send_metadata.metadata;
break;
case GRPC_OP_SEND_MESSAGE:
- st->ops[st->op_num].data.send_message = grpc_rb_s_to_byte_buffer(
- RSTRING_PTR(this_value), RSTRING_LEN(this_value));
+ st->ops[st->op_num].data.send_message.send_message =
+ grpc_rb_s_to_byte_buffer(RSTRING_PTR(this_value),
+ RSTRING_LEN(this_value));
st->ops[st->op_num].flags = st->write_flag;
break;
case GRPC_OP_SEND_CLOSE_FROM_CLIENT:
@@ -686,10 +687,11 @@ static void grpc_run_batch_stack_fill_ops(run_batch_stack *st, VALUE ops_hash) {
&st->ops[st->op_num], &st->send_trailing_metadata, this_value);
break;
case GRPC_OP_RECV_INITIAL_METADATA:
- st->ops[st->op_num].data.recv_initial_metadata = &st->recv_metadata;
+ st->ops[st->op_num].data.recv_initial_metadata.recv_initial_metadata =
+ &st->recv_metadata;
break;
case GRPC_OP_RECV_MESSAGE:
- st->ops[st->op_num].data.recv_message = &st->recv_message;
+ st->ops[st->op_num].data.recv_message.recv_message = &st->recv_message;
break;
case GRPC_OP_RECV_STATUS_ON_CLIENT:
st->ops[st->op_num].data.recv_status_on_client.trailing_metadata =
diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb
index f6da257a78..b1c189033d 100644
--- a/src/ruby/lib/grpc/version.rb
+++ b/src/ruby/lib/grpc/version.rb
@@ -29,5 +29,5 @@
# GRPC contains the General RPC module.
module GRPC
- VERSION = '1.1.0.pre1'
+ VERSION = '1.1.1'
end
diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb
index 2331f9d7eb..0a23edab17 100644
--- a/src/ruby/tools/version.rb
+++ b/src/ruby/tools/version.rb
@@ -29,6 +29,6 @@
module GRPC
module Tools
- VERSION = '1.1.0.pre1'
+ VERSION = '1.1.1'
end
end