aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2017-01-30 10:13:24 -0800
committerGravatar GitHub <noreply@github.com>2017-01-30 10:13:24 -0800
commit4b844a40ad4222b86f1739ff25ef43dd3a178994 (patch)
tree0b52ff43bc75007ad9aacf810cec1aa56a6c9432 /src/core/lib
parent0bbe89d4b3033b27ecbbac783432824c38df5606 (diff)
parent203de0fa412269b3776663d9e2d05d7aed665af8 (diff)
Merge pull request #9489 from nicolasnoble/mark_backport
Mark backport of PR #9465
Diffstat (limited to 'src/core/lib')
-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
3 files changed, 16 insertions, 10 deletions
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,