aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-04-06 08:56:10 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-04-06 08:56:10 -0700
commitd6d31b006ac33b3114571e30c08e136a302d12c0 (patch)
treea723367f6919d927fbf3a71a462ed649064454eb /src
parentff558bac5c7be1571db720f23974d70b75385415 (diff)
parent5beff342346e4c358e5ccf39d3809b99bd60672c (diff)
Merge github.com:grpc/grpc into minimal_test
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/client_channel/client_channel.c20
-rw-r--r--src/core/ext/filters/client_channel/subchannel.c3
-rw-r--r--src/python/grpcio_reflection/MANIFEST.in4
3 files changed, 15 insertions, 12 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel.c b/src/core/ext/filters/client_channel/client_channel.c
index 9dda1a20cd..1cc324ed3f 100644
--- a/src/core/ext/filters/client_channel/client_channel.c
+++ b/src/core/ext/filters/client_channel/client_channel.c
@@ -920,14 +920,14 @@ static void subchannel_ready_locked(grpc_exec_ctx *exec_ctx, void *arg,
.arena = calld->arena};
grpc_error *new_error = grpc_connected_subchannel_create_call(
exec_ctx, calld->connected_subchannel, &call_args, &subchannel_call);
+ gpr_atm_rel_store(&calld->subchannel_call,
+ (gpr_atm)(uintptr_t)subchannel_call);
if (new_error != GRPC_ERROR_NONE) {
new_error = grpc_error_add_child(new_error, error);
- subchannel_call = CANCELLED_CALL;
fail_locked(exec_ctx, calld, new_error);
+ } else {
+ retry_waiting_locked(exec_ctx, calld);
}
- gpr_atm_rel_store(&calld->subchannel_call,
- (gpr_atm)(uintptr_t)subchannel_call);
- retry_waiting_locked(exec_ctx, calld);
}
GRPC_CALL_STACK_UNREF(exec_ctx, calld->owning_call, "pick_subchannel");
}
@@ -1158,16 +1158,16 @@ static void start_transport_stream_op_batch_locked_inner(
.arena = calld->arena};
grpc_error *error = grpc_connected_subchannel_create_call(
exec_ctx, calld->connected_subchannel, &call_args, &subchannel_call);
+ gpr_atm_rel_store(&calld->subchannel_call,
+ (gpr_atm)(uintptr_t)subchannel_call);
if (error != GRPC_ERROR_NONE) {
- subchannel_call = CANCELLED_CALL;
fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error));
grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, op, error);
+ } else {
+ retry_waiting_locked(exec_ctx, calld);
+ /* recurse to retry */
+ start_transport_stream_op_batch_locked_inner(exec_ctx, op, elem);
}
- gpr_atm_rel_store(&calld->subchannel_call,
- (gpr_atm)(uintptr_t)subchannel_call);
- retry_waiting_locked(exec_ctx, calld);
- /* recurse to retry */
- start_transport_stream_op_batch_locked_inner(exec_ctx, op, elem);
/* early out */
return;
}
diff --git a/src/core/ext/filters/client_channel/subchannel.c b/src/core/ext/filters/client_channel/subchannel.c
index 29a1a09555..9a7a7a0ee5 100644
--- a/src/core/ext/filters/client_channel/subchannel.c
+++ b/src/core/ext/filters/client_channel/subchannel.c
@@ -769,7 +769,7 @@ grpc_error *grpc_connected_subchannel_create_call(
*call = gpr_arena_alloc(
args->arena, sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
- (*call)->connection = con; // Ref is added below.
+ (*call)->connection = GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
const grpc_call_element_args call_args = {.call_stack = callstk,
.server_transport_data = NULL,
.context = NULL,
@@ -784,7 +784,6 @@ grpc_error *grpc_connected_subchannel_create_call(
gpr_log(GPR_ERROR, "error: %s", error_string);
return error;
}
- GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, args->pollent);
return GRPC_ERROR_NONE;
}
diff --git a/src/python/grpcio_reflection/MANIFEST.in b/src/python/grpcio_reflection/MANIFEST.in
new file mode 100644
index 0000000000..0f2130c0b5
--- /dev/null
+++ b/src/python/grpcio_reflection/MANIFEST.in
@@ -0,0 +1,4 @@
+include grpc_version.py
+include reflection_commands.py
+graft grpc_reflection
+global-exclude *.pyc