Flesh out initial_op
diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c
index 7287408..45a7436 100644
--- a/src/core/channel/http_client_filter.c
+++ b/src/core/channel/http_client_filter.c
@@ -87,13 +87,11 @@
calld->on_done_recv(calld->recv_user_data, success);
}
-static void hc_start_transport_op(grpc_call_element *elem, grpc_transport_op *op) {
+static void hc_mutate_op(grpc_call_element *elem, grpc_transport_op *op) {
/* grab pointers to our data from the call element */
call_data *calld = elem->call_data;
channel_data *channeld = elem->channel_data;
size_t i;
- GRPC_CALL_LOG_OP(GPR_INFO, elem, op);
-
if (op->send_ops && !calld->sent_initial_metadata) {
size_t nops = op->send_ops->nops;
grpc_stream_op *ops = op->send_ops->ops;
@@ -123,7 +121,11 @@
op->on_done_recv = hc_on_recv;
op->recv_user_data = elem;
}
+}
+static void hc_start_transport_op(grpc_call_element *elem, grpc_transport_op *op) {
+ GRPC_CALL_LOG_OP(GPR_INFO, elem, op);
+ hc_mutate_op(elem, op);
grpc_call_next_op(elem, op);
}
@@ -146,10 +148,12 @@
/* Constructor for call_data */
static void init_call_elem(grpc_call_element *elem,
- const void *server_transport_data) {
+ const void *server_transport_data,
+ grpc_transport_op *initial_op) {
call_data *calld = elem->call_data;
calld->sent_initial_metadata = 0;
calld->got_initial_metadata = 0;
+ if (initial_op) hc_mutate_op(elem, initial_op);
}
/* Destructor for call_data */