Merge github.com:grpc/grpc into rollfwd

pull/9444/head
Craig Tiller 8 years ago
commit afceb2edbd
  1. 8
      include/grpc++/impl/codegen/call.h
  2. 12
      include/grpc/impl/codegen/grpc_types.h
  3. 9
      src/core/ext/lb_policy/grpclb/grpclb.c
  4. 13
      src/core/lib/surface/call.c
  5. 8
      src/core/lib/surface/call_log_batch.c
  6. 5
      src/core/lib/surface/server.c
  7. 23
      src/csharp/ext/grpc_csharp_ext.c
  8. 16
      src/node/ext/call.cc
  9. 8
      src/objective-c/GRPCClient/private/GRPCWrappedCall.m
  10. 6
      src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
  11. 9
      src/php/ext/grpc/call.c
  12. 15
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
  13. 7
      src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
  14. 12
      src/ruby/ext/grpc/rb_call.c
  15. 2
      test/core/bad_ssl/bad_ssl_test.c
  16. 3
      test/core/client_channel/lb_policies_test.c
  17. 2
      test/core/end2end/bad_server_response_test.c
  18. 2
      test/core/end2end/dualstack_socket_test.c
  19. 15
      test/core/end2end/fixtures/proxy.c
  20. 8
      test/core/end2end/fuzzers/api_fuzzer.c
  21. 4
      test/core/end2end/fuzzers/client_fuzzer.c
  22. 18
      test/core/end2end/invalid_call_argument_test.c
  23. 6
      test/core/end2end/tests/authority_not_supported.c
  24. 2
      test/core/end2end/tests/bad_hostname.c
  25. 10
      test/core/end2end/tests/binary_metadata.c
  26. 16
      test/core/end2end/tests/call_creds.c
  27. 10
      test/core/end2end/tests/cancel_after_accept.c
  28. 10
      test/core/end2end/tests/cancel_after_client_done.c
  29. 6
      test/core/end2end/tests/cancel_after_invoke.c
  30. 6
      test/core/end2end/tests/cancel_before_invoke.c
  31. 2
      test/core/end2end/tests/cancel_with_status.c
  32. 16
      test/core/end2end/tests/compressed_payload.c
  33. 2
      test/core/end2end/tests/default_host.c
  34. 2
      test/core/end2end/tests/disappearing_server.c
  35. 4
      test/core/end2end/tests/filter_call_init_fails.c
  36. 4
      test/core/end2end/tests/filter_causes_close.c
  37. 4
      test/core/end2end/tests/filter_latency.c
  38. 2
      test/core/end2end/tests/graceful_server_shutdown.c
  39. 2
      test/core/end2end/tests/high_initial_seqno.c
  40. 2
      test/core/end2end/tests/hpack_size.c
  41. 2
      test/core/end2end/tests/idempotent_request.c
  42. 10
      test/core/end2end/tests/invoke_large_request.c
  43. 6
      test/core/end2end/tests/large_metadata.c
  44. 10
      test/core/end2end/tests/load_reporting_hook.c
  45. 8
      test/core/end2end/tests/max_concurrent_streams.c
  46. 12
      test/core/end2end/tests/max_message_length.c
  47. 2
      test/core/end2end/tests/negative_deadline.c
  48. 6
      test/core/end2end/tests/network_status_change.c
  49. 2
      test/core/end2end/tests/no_logging.c
  50. 10
      test/core/end2end/tests/payload.c
  51. 10
      test/core/end2end/tests/ping_pong_streaming.c
  52. 2
      test/core/end2end/tests/registered_call.c
  53. 4
      test/core/end2end/tests/request_with_flags.c
  54. 6
      test/core/end2end/tests/request_with_payload.c
  55. 7
      test/core/end2end/tests/resource_quota_server.c
  56. 2
      test/core/end2end/tests/server_finishes_request.c
  57. 2
      test/core/end2end/tests/shutdown_finishes_calls.c
  58. 10
      test/core/end2end/tests/simple_cacheable_request.c
  59. 2
      test/core/end2end/tests/simple_delayed_request.c
  60. 10
      test/core/end2end/tests/simple_metadata.c
  61. 2
      test/core/end2end/tests/simple_request.c
  62. 10
      test/core/end2end/tests/streaming_error_response.c
  63. 10
      test/core/end2end/tests/trailing_metadata.c
  64. 10
      test/core/end2end/tests/write_buffering.c
  65. 8
      test/core/end2end/tests/write_buffering_at_end.c
  66. 13
      test/core/fling/client.c
  67. 8
      test/core/fling/server.c
  68. 8
      test/core/memory_usage/client.c
  69. 4
      test/core/memory_usage/server.c
  70. 2
      test/core/surface/lame_client_test.c
  71. 14
      test/cpp/grpclb/grpclb_test.cc

@ -236,7 +236,7 @@ class CallOpSendMessage {
op->op = GRPC_OP_SEND_MESSAGE;
op->flags = write_options_.flags();
op->reserved = NULL;
op->data.send_message = send_buf_;
op->data.send_message.send_message = send_buf_;
// Flags are per-message: clear them after use.
write_options_.Clear();
}
@ -285,7 +285,7 @@ class CallOpRecvMessage {
op->op = GRPC_OP_RECV_MESSAGE;
op->flags = 0;
op->reserved = NULL;
op->data.recv_message = &recv_buf_;
op->data.recv_message.recv_message = &recv_buf_;
}
void FinishOp(bool* status, int max_receive_message_size) {
@ -366,7 +366,7 @@ class CallOpGenericRecvMessage {
op->op = GRPC_OP_RECV_MESSAGE;
op->flags = 0;
op->reserved = NULL;
op->data.recv_message = &recv_buf_;
op->data.recv_message.recv_message = &recv_buf_;
}
void FinishOp(bool* status, int max_receive_message_size) {
@ -474,7 +474,7 @@ class CallOpRecvInitialMetadata {
if (metadata_map_ == nullptr) return;
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = metadata_map_->arr();
op->data.recv_initial_metadata.recv_initial_metadata = metadata_map_->arr();
op->flags = 0;
op->reserved = NULL;
}

@ -418,7 +418,9 @@ typedef struct grpc_op {
grpc_compression_level level;
} maybe_compression_level;
} send_initial_metadata;
struct grpc_byte_buffer *send_message;
struct {
struct grpc_byte_buffer *send_message;
} send_message;
struct {
size_t trailing_metadata_count;
grpc_metadata *trailing_metadata;
@ -433,11 +435,15 @@ typedef struct grpc_op {
object, recv_initial_metadata->array is owned by the caller).
After the operation completes, call grpc_metadata_array_destroy on this
value, or reuse it in a future op. */
grpc_metadata_array *recv_initial_metadata;
struct {
grpc_metadata_array *recv_initial_metadata;
} recv_initial_metadata;
/** ownership of the byte buffer is moved to the caller; the caller must
call grpc_byte_buffer_destroy on this value, or reuse it in a future op.
*/
struct grpc_byte_buffer **recv_message;
struct {
struct grpc_byte_buffer **recv_message;
} recv_message;
struct {
/** ownership of the array is with the caller, but ownership of the
elements stays with the call object (ie key, value members are owned

@ -1181,14 +1181,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++;
@ -1212,7 +1213,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++;
@ -1294,7 +1295,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++;

@ -1388,7 +1388,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;
}
@ -1400,11 +1400,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;
@ -1498,7 +1500,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);
@ -1521,7 +1524,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);

@ -68,7 +68,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:
@ -90,11 +91,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:

@ -600,7 +600,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,
@ -849,7 +849,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,

@ -538,7 +538,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;
@ -547,12 +547,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;
@ -588,12 +589,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;
@ -629,7 +631,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;
@ -687,7 +689,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;
@ -706,7 +709,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;
@ -754,7 +757,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 ++;
@ -773,7 +776,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,

@ -238,7 +238,9 @@ 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;
}
bool IsFinalOp() {
@ -352,8 +354,14 @@ class GetMetadataOp : public Op {
return scope.Escape(ParseMetadata(&recv_metadata));
}
<<<<<<< HEAD
bool ParseOp(Local<Value> value, grpc_op *out) {
out->data.recv_initial_metadata = &recv_metadata;
=======
bool ParseOp(Local<Value> value, grpc_op *out,
shared_ptr<Resources> resources) {
out->data.recv_initial_metadata.recv_initial_metadata = &recv_metadata;
>>>>>>> 4ffcb2058df96c1fa0a319cd3e5d4aa9358e5bae
return true;
}
bool IsFinalOp() {
@ -384,8 +392,14 @@ class ReadMessageOp : public Op {
return scope.Escape(ByteBufferToBuffer(recv_message));
}
<<<<<<< HEAD
bool ParseOp(Local<Value> value, grpc_op *out) {
out->data.recv_message = &recv_message;
=======
bool ParseOp(Local<Value> value, grpc_op *out,
shared_ptr<Resources> resources) {
out->data.recv_message.recv_message = &recv_message;
>>>>>>> 4ffcb2058df96c1fa0a319cd3e5d4aa9358e5bae
return true;
}
bool IsFinalOp() {

@ -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;

@ -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++;

@ -339,7 +339,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;
@ -394,10 +394,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 =
@ -501,7 +502,7 @@ cleanup:
grpc_slice_unref(send_status_details);
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);

@ -283,12 +283,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"

@ -628,7 +628,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
@ -662,7 +662,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
@ -675,7 +675,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

@ -644,7 +644,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);
}
}
}
@ -676,8 +676,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:
@ -689,10 +690,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, &st->send_status_details, 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 =

@ -99,7 +99,7 @@ static void run_test(const char *target, size_t nops) {
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++;

@ -310,7 +310,8 @@ static request_sequences perform_request(servers_fixture *f,
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &rdata->initial_metadata_recv;
op->data.recv_initial_metadata.recv_initial_metadata =
&rdata->initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;

@ -199,7 +199,7 @@ static void start_rpc(int target_port, grpc_status_code expected_status,
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++;

@ -185,7 +185,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
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++;

@ -203,7 +203,7 @@ static void on_p2s_sent_message(void *arg, int success) {
op.op = GRPC_OP_RECV_MESSAGE;
op.flags = 0;
op.reserved = NULL;
op.data.recv_message = &pc->c2p_msg;
op.data.recv_message.recv_message = &pc->c2p_msg;
refpc(pc, "on_c2p_recv_msg");
err = grpc_call_start_batch(pc->c2p, &op, 1,
new_closure(on_c2p_recv_msg, pc), NULL);
@ -228,7 +228,7 @@ static void on_c2p_recv_msg(void *arg, int success) {
op.op = GRPC_OP_SEND_MESSAGE;
op.flags = 0;
op.reserved = NULL;
op.data.send_message = pc->c2p_msg;
op.data.send_message.send_message = pc->c2p_msg;
refpc(pc, "on_p2s_sent_message");
err = grpc_call_start_batch(pc->p2s, &op, 1,
new_closure(on_p2s_sent_message, pc), NULL);
@ -259,7 +259,7 @@ static void on_c2p_sent_message(void *arg, int success) {
op.op = GRPC_OP_RECV_MESSAGE;
op.flags = 0;
op.reserved = NULL;
op.data.recv_message = &pc->p2s_msg;
op.data.recv_message.recv_message = &pc->p2s_msg;
refpc(pc, "on_p2s_recv_msg");
err = grpc_call_start_batch(pc->p2s, &op, 1,
new_closure(on_p2s_recv_msg, pc), NULL);
@ -278,7 +278,7 @@ static void on_p2s_recv_msg(void *arg, int success) {
op.op = GRPC_OP_SEND_MESSAGE;
op.flags = 0;
op.reserved = NULL;
op.data.send_message = pc->p2s_msg;
op.data.send_message.send_message = pc->p2s_msg;
refpc(pc, "on_c2p_sent_message");
err = grpc_call_start_batch(pc->c2p, &op, 1,
new_closure(on_c2p_sent_message, pc), NULL);
@ -347,7 +347,8 @@ static void on_new_call(void *arg, int success) {
op.op = GRPC_OP_RECV_INITIAL_METADATA;
op.flags = 0;
op.data.recv_initial_metadata = &pc->p2s_initial_metadata;
op.data.recv_initial_metadata.recv_initial_metadata =
&pc->p2s_initial_metadata;
refpc(pc, "on_p2s_recv_initial_metadata");
err = grpc_call_start_batch(
pc->p2s, &op, 1, new_closure(on_p2s_recv_initial_metadata, pc), NULL);
@ -364,7 +365,7 @@ static void on_new_call(void *arg, int success) {
op.op = GRPC_OP_RECV_MESSAGE;
op.flags = 0;
op.data.recv_message = &pc->c2p_msg;
op.data.recv_message.recv_message = &pc->c2p_msg;
refpc(pc, "on_c2p_recv_msg");
err = grpc_call_start_batch(pc->c2p, &op, 1,
new_closure(on_c2p_recv_msg, pc), NULL);
@ -372,7 +373,7 @@ static void on_new_call(void *arg, int success) {
op.op = GRPC_OP_RECV_MESSAGE;
op.flags = 0;
op.data.recv_message = &pc->p2s_msg;
op.data.recv_message.recv_message = &pc->p2s_msg;
refpc(pc, "on_p2s_recv_msg");
err = grpc_call_start_batch(pc->p2s, &op, 1,
new_closure(on_p2s_recv_msg, pc), NULL);

@ -990,8 +990,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
ok = false;
} else {
has_ops |= 1 << GRPC_OP_SEND_MESSAGE;
g_active_call->send_message = op->data.send_message =
read_message(&inp);
g_active_call->send_message =
op->data.send_message.send_message = read_message(&inp);
}
break;
case GRPC_OP_SEND_CLOSE_FROM_CLIENT:
@ -1014,13 +1014,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case GRPC_OP_RECV_INITIAL_METADATA:
op->op = GRPC_OP_RECV_INITIAL_METADATA;
has_ops |= 1 << GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata =
op->data.recv_initial_metadata.recv_initial_metadata =
&g_active_call->recv_initial_metadata;
break;
case GRPC_OP_RECV_MESSAGE:
op->op = GRPC_OP_RECV_MESSAGE;
has_ops |= 1 << GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &g_active_call->recv_message;
op->data.recv_message.recv_message = &g_active_call->recv_message;
break;
case GRPC_OP_RECV_STATUS_ON_CLIENT:
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;

@ -98,12 +98,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
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++;

@ -237,7 +237,7 @@ static void test_send_null_message() {
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = NULL;
op->data.send_message.send_message = NULL;
op->flags = 0;
op->reserved = NULL;
op++;
@ -263,12 +263,12 @@ static void test_send_messages_at_the_same_time() {
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++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = tag(2);
op->data.send_message.send_message = tag(2);
op->flags = 0;
op->reserved = NULL;
op++;
@ -307,7 +307,8 @@ static void test_receive_initial_metadata_twice_at_client() {
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &g_state.initial_metadata_recv;
op->data.recv_initial_metadata.recv_initial_metadata =
&g_state.initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -318,7 +319,8 @@ static void test_receive_initial_metadata_twice_at_client() {
cq_verify(g_state.cqv);
op = g_state.ops;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &g_state.initial_metadata_recv;
op->data.recv_initial_metadata.recv_initial_metadata =
&g_state.initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -336,7 +338,7 @@ static void test_receive_message_with_invalid_flags() {
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &payload;
op->data.recv_message.recv_message = &payload;
op->flags = 1;
op->reserved = NULL;
op++;
@ -354,12 +356,12 @@ static void test_receive_two_messages_at_the_same_time() {
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &payload;
op->data.recv_message.recv_message = &payload;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &payload;
op->data.recv_message.recv_message = &payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -141,7 +141,7 @@ static void test_with_authority_header(grpc_end2end_test_config config) {
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++;
@ -150,12 +150,12 @@ static void test_with_authority_header(grpc_end2end_test_config config) {
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++;

@ -134,7 +134,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
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++;

@ -168,7 +168,7 @@ static void test_request_response_with_metadata_and_payload(
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++;
@ -177,12 +177,12 @@ static void test_request_response_with_metadata_and_payload(
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++;
@ -212,7 +212,7 @@ static void test_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -230,7 +230,7 @@ static void test_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -203,7 +203,7 @@ static void request_response_with_payload_and_call_creds(
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++;
@ -212,12 +212,12 @@ static void request_response_with_payload_and_call_creds(
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++;
@ -258,7 +258,7 @@ static void request_response_with_payload_and_call_creds(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -276,7 +276,7 @@ static void request_response_with_payload_and_call_creds(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@ -434,7 +434,7 @@ static void test_request_with_server_rejecting_client_creds(
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++;
@ -443,12 +443,12 @@ static void test_request_with_server_rejecting_client_creds(
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++;

@ -180,17 +180,17 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
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++;
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++;
@ -206,7 +206,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -216,7 +216,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -153,7 +153,7 @@ static void test_cancel_after_accept_and_writes_closed(
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++;
@ -162,12 +162,12 @@ static void test_cancel_after_accept_and_writes_closed(
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++;
@ -183,7 +183,7 @@ static void test_cancel_after_accept_and_writes_closed(
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -198,7 +198,7 @@ static void test_cancel_after_accept_and_writes_closed(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -147,7 +147,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
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++;
@ -156,12 +156,12 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
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++;

@ -147,7 +147,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
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++;
@ -156,12 +156,12 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
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++;

@ -132,7 +132,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -175,7 +175,7 @@ static void request_for_disabled_algorithm(
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 = send_flags_bitmask;
op->reserved = NULL;
op++;
@ -184,7 +184,7 @@ static void request_for_disabled_algorithm(
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++;
@ -212,7 +212,7 @@ static void request_for_disabled_algorithm(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -354,7 +354,7 @@ static void request_with_payload_template(
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++;
@ -411,12 +411,12 @@ static void request_with_payload_template(
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = request_payload;
op->data.send_message.send_message = request_payload;
op->flags = client_send_flags_bitmask;
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++;
@ -426,7 +426,7 @@ static void request_with_payload_template(
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -443,7 +443,7 @@ static void request_with_payload_template(
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -141,7 +141,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
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++;

@ -120,7 +120,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_config config,
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++;

@ -148,7 +148,7 @@ static void test_request(grpc_end2end_test_config config) {
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++;
@ -157,7 +157,7 @@ static void test_request(grpc_end2end_test_config config) {
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++;

@ -144,7 +144,7 @@ static void test_request(grpc_end2end_test_config config) {
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++;
@ -153,7 +153,7 @@ static void test_request(grpc_end2end_test_config config) {
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++;

@ -157,7 +157,7 @@ static void test_request(grpc_end2end_test_config config) {
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++;
@ -166,7 +166,7 @@ static void test_request(grpc_end2end_test_config config) {
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++;

@ -135,7 +135,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
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++;

@ -140,7 +140,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -293,7 +293,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -144,7 +144,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -163,7 +163,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
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++;
@ -172,12 +172,12 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
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++;
@ -206,7 +206,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -224,7 +224,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -151,7 +151,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
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++;
@ -160,7 +160,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
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++;
@ -191,7 +191,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;

@ -171,7 +171,7 @@ static void request_response_with_payload(
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++;
@ -180,12 +180,12 @@ static void request_response_with_payload(
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++;
@ -214,7 +214,7 @@ static void request_response_with_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -232,7 +232,7 @@ static void request_response_with_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -136,7 +136,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;
@ -299,7 +299,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &initial_metadata_recv1;
op->data.recv_initial_metadata.recv_initial_metadata =
&initial_metadata_recv1;
op->flags = 0;
op->reserved = NULL;
op++;
@ -330,7 +331,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &initial_metadata_recv1;
op->data.recv_initial_metadata.recv_initial_metadata =
&initial_metadata_recv1;
op->flags = 0;
op->reserved = NULL;
op++;

@ -197,7 +197,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
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++;
@ -206,7 +206,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
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++;
@ -241,7 +241,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &recv_payload;
op->data.recv_message.recv_message = &recv_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@ -378,12 +378,12 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
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 = &recv_payload;
op->data.recv_message.recv_message = &recv_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@ -417,7 +417,7 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -132,7 +132,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -142,7 +142,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
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,7 +151,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
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++;
@ -178,7 +178,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;

@ -171,7 +171,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -161,7 +161,7 @@ static void request_response_with_payload(grpc_end2end_test_config config,
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++;
@ -170,12 +170,12 @@ static void request_response_with_payload(grpc_end2end_test_config config,
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++;
@ -204,7 +204,7 @@ static void request_response_with_payload(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -222,7 +222,7 @@ static void request_response_with_payload(grpc_end2end_test_config config,
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -144,7 +144,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
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++;
@ -187,12 +187,12 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
memset(ops, 0, sizeof(ops));
op = ops;
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++;
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++;
@ -202,7 +202,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -214,7 +214,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -135,7 +135,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -140,7 +140,7 @@ static void test_invoke_request_with_flags(
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 = flags_for_op[op->op];
op->reserved = NULL;
op++;
@ -149,7 +149,7 @@ static void test_invoke_request_with_flags(
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 = flags_for_op[op->op];
op->reserved = NULL;
op++;

@ -139,7 +139,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
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++;
@ -148,7 +148,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
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++;
@ -176,7 +176,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;

@ -200,7 +200,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
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++;
@ -209,7 +209,8 @@ void resource_quota_server(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &initial_metadata_recv[i];
op->data.recv_initial_metadata.recv_initial_metadata =
&initial_metadata_recv[i];
op->flags = 0;
op->reserved = NULL;
op++;
@ -274,7 +275,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv[call_id];
op->data.recv_message.recv_message = &request_payload_recv[call_id];
op->flags = 0;
op->reserved = NULL;
op++;

@ -134,7 +134,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -128,7 +128,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
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++;

@ -165,7 +165,7 @@ static void test_cacheable_request_response_with_metadata_and_payload(
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++;
@ -174,12 +174,12 @@ static void test_cacheable_request_response_with_metadata_and_payload(
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++;
@ -209,7 +209,7 @@ static void test_cacheable_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -227,7 +227,7 @@ static void test_cacheable_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -129,7 +129,7 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
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++;

@ -162,7 +162,7 @@ static void test_request_response_with_metadata_and_payload(
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++;
@ -171,12 +171,12 @@ static void test_request_response_with_metadata_and_payload(
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++;
@ -206,7 +206,7 @@ static void test_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -224,7 +224,7 @@ static void test_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -144,7 +144,7 @@ static void simple_request_body(grpc_end2end_test_config config,
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++;

@ -144,10 +144,10 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
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++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &response_payload1_recv;
op->data.recv_message.recv_message = &response_payload1_recv;
op++;
if (request_status_early) {
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
@ -171,7 +171,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
op->data.send_initial_metadata.count = 0;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload1;
op->data.send_message.send_message = response_payload1;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
@ -182,7 +182,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload2;
op->data.send_message.send_message = response_payload2;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
@ -211,7 +211,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &response_payload2_recv;
op->data.recv_message.recv_message = &response_payload2_recv;
op++;
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);

@ -170,7 +170,7 @@ static void test_request_response_with_metadata_and_payload(
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++;
@ -179,12 +179,12 @@ static void test_request_response_with_metadata_and_payload(
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++;
@ -214,7 +214,7 @@ static void test_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -232,7 +232,7 @@ static void test_request_response_with_metadata_and_payload(
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;

@ -146,7 +146,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
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++;
@ -163,7 +163,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = request_payload1;
op->data.send_message.send_message = request_payload1;
op->flags = GRPC_WRITE_BUFFER_HINT;
op++;
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL);
@ -181,7 +181,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv1;
op->data.recv_message.recv_message = &request_payload_recv1;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
@ -195,7 +195,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = request_payload2;
op->data.send_message.send_message = request_payload2;
op->flags = 0;
op++;
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(4), NULL);
@ -210,7 +210,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv2;
op->data.recv_message.recv_message = &request_payload_recv2;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);

@ -143,7 +143,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
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++;
@ -160,7 +160,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = request_payload;
op->data.send_message.send_message = request_payload;
op->flags = GRPC_WRITE_BUFFER_HINT;
op++;
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL);
@ -178,7 +178,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv1;
op->data.recv_message.recv_message = &request_payload_recv1;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
@ -205,7 +205,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv2;
op->data.recv_message.recv_message = &request_payload_recv2;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);

@ -71,15 +71,15 @@ static void init_ping_pong_request(void) {
op->data.send_initial_metadata.count = 0;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = the_buffer;
op->data.send_message.send_message = the_buffer;
op++;
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
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++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &response_payload_recv;
op->data.recv_message.recv_message = &response_payload_recv;
op++;
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
@ -117,7 +117,8 @@ static void init_ping_pong_stream(void) {
stream_init_ops[0].op = GRPC_OP_SEND_INITIAL_METADATA;
stream_init_ops[0].data.send_initial_metadata.count = 0;
stream_init_ops[1].op = GRPC_OP_RECV_INITIAL_METADATA;
stream_init_ops[1].data.recv_initial_metadata = &initial_metadata_recv;
stream_init_ops[1].data.recv_initial_metadata.recv_initial_metadata =
&initial_metadata_recv;
error = grpc_call_start_batch(call, stream_init_ops, 2, (void *)1, NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
@ -125,9 +126,9 @@ static void init_ping_pong_stream(void) {
grpc_metadata_array_init(&initial_metadata_recv);
stream_step_ops[0].op = GRPC_OP_SEND_MESSAGE;
stream_step_ops[0].data.send_message = the_buffer;
stream_step_ops[0].data.send_message.send_message = the_buffer;
stream_step_ops[1].op = GRPC_OP_RECV_MESSAGE;
stream_step_ops[1].data.recv_message = &response_payload_recv;
stream_step_ops[1].data.recv_message.recv_message = &response_payload_recv;
}
static void step_ping_pong_stream(void) {

@ -107,13 +107,13 @@ static void handle_unary_method(void) {
op->data.send_initial_metadata.count = 0;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &terminal_buffer;
op->data.recv_message.recv_message = &terminal_buffer;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
if (payload_buffer == NULL) {
gpr_log(GPR_INFO, "NULL payload buffer !!!");
}
op->data.send_message = payload_buffer;
op->data.send_message.send_message = payload_buffer;
op++;
op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
op->data.send_status_from_server.status = GRPC_STATUS_OK;
@ -144,7 +144,7 @@ static void start_read_op(int t) {
grpc_call_error error;
/* Starting read at server */
read_op.op = GRPC_OP_RECV_MESSAGE;
read_op.data.recv_message = &payload_buffer;
read_op.data.recv_message.recv_message = &payload_buffer;
error = grpc_call_start_batch(call, &read_op, 1, tag(t), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
}
@ -157,7 +157,7 @@ static void start_write_op(void) {
if (payload_buffer == NULL) {
gpr_log(GPR_INFO, "NULL payload buffer !!!");
}
write_op.data.send_message = payload_buffer;
write_op.data.send_message.send_message = payload_buffer;
error = grpc_call_start_batch(call, &write_op, 1, tagarg, NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
}

@ -81,7 +81,8 @@ static void init_ping_pong_request(int call_idx) {
op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &calls[call_idx].initial_metadata_recv;
op->data.recv_initial_metadata.recv_initial_metadata =
&calls[call_idx].initial_metadata_recv;
op++;
grpc_slice hostname = grpc_slice_from_static_string("localhost");
@ -138,10 +139,11 @@ static struct grpc_memory_counters send_snapshot_request(int call_idx,
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &calls[call_idx].initial_metadata_recv;
op->data.recv_initial_metadata.recv_initial_metadata =
&calls[call_idx].initial_metadata_recv;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &response_payload_recv;
op->data.recv_message.recv_message = &response_payload_recv;
op++;
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
op->data.recv_status_on_client.trailing_metadata =

@ -130,13 +130,13 @@ static void send_snapshot(void *tag, struct grpc_memory_counters *snapshot) {
op->data.send_initial_metadata.count = 0;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &terminal_buffer;
op->data.recv_message.recv_message = &terminal_buffer;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
if (payload_buffer == NULL) {
gpr_log(GPR_INFO, "NULL payload buffer !!!");
}
op->data.send_message = payload_buffer;
op->data.send_message.send_message = payload_buffer;
op++;
op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
op->data.send_status_from_server.status = GRPC_STATUS_OK;

@ -125,7 +125,7 @@ int main(int argc, char **argv) {
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++;

@ -213,7 +213,7 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
// receive request for backends
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -268,7 +268,7 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1);
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@ -373,7 +373,7 @@ static void start_backend_server(server_fixture *sf) {
while (!exit) {
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &request_payload_recv;
op->data.recv_message.recv_message = &request_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
@ -402,7 +402,7 @@ static void start_backend_server(server_fixture *sf) {
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = response_payload;
op->data.send_message.send_message = response_payload;
op->flags = 0;
op->reserved = NULL;
op++;
@ -493,7 +493,7 @@ static void perform_request(client_fixture *cf) {
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++;
@ -512,12 +512,12 @@ static void perform_request(client_fixture *cf) {
op = ops;
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++;
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++;

Loading…
Cancel
Save