diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-02-11 21:20:25 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-02-11 21:20:25 -0800 |
commit | a847a8f8bc3f2fdc542d11671a4d34997f2b0538 (patch) | |
tree | 9c01dd8c195354d0bd0d6ce1e7bfe3fd5f744255 /src | |
parent | 0d6b9b35ee8db0249d0c541a087a1ecdc0ab1f8d (diff) |
Finish streaming, lame client
Diffstat (limited to 'src')
-rw-r--r-- | src/core/surface/lame_client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c index 411dbabfd3..a8fdeed87f 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/surface/lame_client.c @@ -47,6 +47,7 @@ typedef struct { } call_data; typedef struct { + grpc_mdelem *status; grpc_mdelem *message; } channel_data; @@ -57,6 +58,7 @@ static void call_op(grpc_call_element *elem, grpc_call_element *from_elem, switch (op->type) { case GRPC_SEND_START: + grpc_call_recv_metadata(elem, grpc_mdelem_ref(channeld->status)); grpc_call_recv_metadata(elem, grpc_mdelem_ref(channeld->message)); grpc_call_stream_closed(elem); break; @@ -93,18 +95,22 @@ static void init_channel_elem(grpc_channel_element *elem, const grpc_channel_args *args, grpc_mdctx *mdctx, int is_first, int is_last) { channel_data *channeld = elem->channel_data; + char status[12]; GPR_ASSERT(is_first); GPR_ASSERT(is_last); channeld->message = grpc_mdelem_from_strings(mdctx, "grpc-message", "Rpc sent on a lame channel."); + gpr_ltoa(GRPC_STATUS_UNKNOWN, status); + channeld->status = grpc_mdelem_from_strings(mdctx, "grpc-status", status); } static void destroy_channel_elem(grpc_channel_element *elem) { channel_data *channeld = elem->channel_data; grpc_mdelem_unref(channeld->message); + grpc_mdelem_unref(channeld->status); } static const grpc_channel_filter lame_filter = { |