s/grpc_transport_op/grpc_transport_stream_op/g
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 1cd1dc8..93d7715 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -232,7 +232,7 @@
gpr_uint8 writing;
/** are we calling back (via cb) with a channel-level event */
gpr_uint8 calling_back_channel;
- /** are we calling back any grpc_transport_op completion events */
+ /** are we calling back any grpc_transport_stream_op completion events */
gpr_uint8 calling_back_ops;
gpr_uint8 destroying;
gpr_uint8 closed;
@@ -399,7 +399,8 @@
static void maybe_join_window_updates(transport *t, stream *s);
static void finish_reads(transport *t);
static void add_to_pollset_locked(transport *t, grpc_pollset *pollset);
-static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op);
+static void perform_op_locked(transport *t, stream *s,
+ grpc_transport_stream_op *op);
static void add_metadata_batch(transport *t, stream *s);
static void flowctl_trace(transport *t, const char *flow, gpr_int32 window,
@@ -644,7 +645,8 @@
}
static int init_stream(grpc_transport *gt, grpc_stream *gs,
- const void *server_data, grpc_transport_op *initial_op) {
+ const void *server_data,
+ grpc_transport_stream_op *initial_op) {
transport *t = (transport *)gt;
stream *s = (stream *)gs;
@@ -1127,7 +1129,8 @@
}
}
-static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) {
+static void perform_op_locked(transport *t, stream *s,
+ grpc_transport_stream_op *op) {
if (op->cancel_with_status != GRPC_STATUS_OK) {
cancel_stream(
t, s, op->cancel_with_status,
@@ -1186,7 +1189,7 @@
}
static void perform_op(grpc_transport *gt, grpc_stream *gs,
- grpc_transport_op *op) {
+ grpc_transport_stream_op *op) {
transport *t = (transport *)gt;
stream *s = (stream *)gs;
diff --git a/src/core/transport/transport.c b/src/core/transport/transport.c
index a9948cd..400c202 100644
--- a/src/core/transport/transport.c
+++ b/src/core/transport/transport.c
@@ -53,13 +53,13 @@
int grpc_transport_init_stream(grpc_transport *transport, grpc_stream *stream,
const void *server_data,
- grpc_transport_op *initial_op) {
+ grpc_transport_stream_op *initial_op) {
return transport->vtable->init_stream(transport, stream, server_data,
initial_op);
}
void grpc_transport_perform_op(grpc_transport *transport, grpc_stream *stream,
- grpc_transport_op *op) {
+ grpc_transport_stream_op *op) {
transport->vtable->perform_op(transport, stream, op);
}
@@ -96,7 +96,8 @@
setup->vtable->del_interested_party(setup, pollset);
}
-void grpc_transport_op_finish_with_failure(grpc_transport_op *op) {
+void grpc_transport_stream_op_finish_with_failure(
+ grpc_transport_stream_op *op) {
if (op->send_ops) {
op->on_done_send(op->send_user_data, 0);
}
@@ -108,9 +109,9 @@
}
}
-void grpc_transport_op_add_cancellation(grpc_transport_op *op,
- grpc_status_code status,
- grpc_mdstr *message) {
+void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op,
+ grpc_status_code status,
+ grpc_mdstr *message) {
if (op->cancel_with_status == GRPC_STATUS_OK) {
op->cancel_with_status = status;
op->cancel_message = message;
diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h
index 7f60fdc..72bc492 100644
--- a/src/core/transport/transport.h
+++ b/src/core/transport/transport.h
@@ -63,7 +63,7 @@
} grpc_stream_state;
/* Transport op: a set of operations to perform on a transport */
-typedef struct grpc_transport_op {
+typedef struct grpc_transport_stream_op {
void (*on_consumed)(void *user_data, int success);
void *on_consumed_user_data;
@@ -84,7 +84,7 @@
/* Indexes correspond to grpc_context_index enum values */
grpc_call_context_element *context;
-} grpc_transport_op;
+} grpc_transport_stream_op;
/* Callbacks made from the transport to the upper layers of grpc. */
struct grpc_transport_callbacks {
@@ -126,7 +126,7 @@
supplied from the accept_stream callback function */
int grpc_transport_init_stream(grpc_transport *transport, grpc_stream *stream,
const void *server_data,
- grpc_transport_op *initial_op);
+ grpc_transport_stream_op *initial_op);
/* Destroy transport data for a stream.
@@ -141,17 +141,17 @@
void grpc_transport_destroy_stream(grpc_transport *transport,
grpc_stream *stream);
-void grpc_transport_op_finish_with_failure(grpc_transport_op *op);
+void grpc_transport_stream_op_finish_with_failure(grpc_transport_stream_op *op);
-void grpc_transport_op_add_cancellation(grpc_transport_op *op,
- grpc_status_code status,
- grpc_mdstr *message);
+void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op,
+ grpc_status_code status,
+ grpc_mdstr *message);
/* TODO(ctiller): remove this */
void grpc_transport_add_to_pollset(grpc_transport *transport,
grpc_pollset *pollset);
-char *grpc_transport_op_string(grpc_transport_op *op);
+char *grpc_transport_stream_op_string(grpc_transport_stream_op *op);
/* Send a batch of operations on a transport
@@ -161,9 +161,9 @@
transport - the transport on which to initiate the stream
stream - the stream on which to send the operations. This must be
non-NULL and previously initialized by the same transport.
- op - a grpc_transport_op specifying the op to perform */
+ op - a grpc_transport_stream_op specifying the op to perform */
void grpc_transport_perform_op(grpc_transport *transport, grpc_stream *stream,
- grpc_transport_op *op);
+ grpc_transport_stream_op *op);
/* Send a ping on a transport
diff --git a/src/core/transport/transport_impl.h b/src/core/transport/transport_impl.h
index 479e153..2f940dd 100644
--- a/src/core/transport/transport_impl.h
+++ b/src/core/transport/transport_impl.h
@@ -43,11 +43,12 @@
/* implementation of grpc_transport_init_stream */
int (*init_stream)(grpc_transport *self, grpc_stream *stream,
- const void *server_data, grpc_transport_op *initial_op);
+ const void *server_data,
+ grpc_transport_stream_op *initial_op);
/* implementation of grpc_transport_send_batch */
void (*perform_op)(grpc_transport *self, grpc_stream *stream,
- grpc_transport_op *op);
+ grpc_transport_stream_op *op);
/* implementation of grpc_transport_add_to_pollset */
void (*add_to_pollset)(grpc_transport *self, grpc_pollset *pollset);
diff --git a/src/core/transport/transport_op_string.c b/src/core/transport/transport_op_string.c
index 5c4edb0..43e14a7 100644
--- a/src/core/transport/transport_op_string.c
+++ b/src/core/transport/transport_op_string.c
@@ -107,7 +107,7 @@
return out;
}
-char *grpc_transport_op_string(grpc_transport_op *op) {
+char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) {
char *tmp;
char *out;
int first = 1;
@@ -158,8 +158,8 @@
}
void grpc_call_log_op(char *file, int line, gpr_log_severity severity,
- grpc_call_element *elem, grpc_transport_op *op) {
- char *str = grpc_transport_op_string(op);
+ grpc_call_element *elem, grpc_transport_stream_op *op) {
+ char *str = grpc_transport_stream_op_string(op);
gpr_log(file, line, severity, "OP[%s:%p]: %s", elem->filter->name, elem, str);
gpr_free(str);
}