|
|
|
@ -83,9 +83,9 @@ static grpc_metadata_array metadata_batch_to_md_array( |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
static grpc_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx, void *user_data, |
|
|
|
|
grpc_mdelem md) { |
|
|
|
|
static grpc_filtered_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx, |
|
|
|
|
void *user_data, |
|
|
|
|
grpc_mdelem md) { |
|
|
|
|
grpc_call_element *elem = user_data; |
|
|
|
|
call_data *calld = elem->call_data; |
|
|
|
|
size_t i; |
|
|
|
@ -93,11 +93,10 @@ static grpc_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx, void *user_data, |
|
|
|
|
const grpc_metadata *consumed_md = &calld->consumed_md[i]; |
|
|
|
|
if (grpc_slice_eq(GRPC_MDKEY(md), consumed_md->key) && |
|
|
|
|
grpc_slice_eq(GRPC_MDVALUE(md), consumed_md->value)) |
|
|
|
|
return GRPC_MDNULL; |
|
|
|
|
return GRPC_FILTERED_REMOVE(); |
|
|
|
|
} |
|
|
|
|
return md; |
|
|
|
|
return GRPC_FILTERED_MDELEM(md); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
static void destroy_op(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { |
|
|
|
|
gpr_free(arg); |
|
|
|
@ -122,12 +121,12 @@ static void on_md_processing_done( |
|
|
|
|
if (status == GRPC_STATUS_OK) { |
|
|
|
|
calld->consumed_md = consumed_md; |
|
|
|
|
calld->num_consumed_md = num_consumed_md; |
|
|
|
|
#if 0 |
|
|
|
|
grpc_metadata_batch_filter(&exec_ctx, calld->recv_initial_metadata, |
|
|
|
|
remove_consumed_md, elem); |
|
|
|
|
#else |
|
|
|
|
if (num_consumed_md) abort(); |
|
|
|
|
#endif |
|
|
|
|
/* TODO(ctiller): propagate error */ |
|
|
|
|
GRPC_LOG_IF_ERROR( |
|
|
|
|
"grpc_metadata_batch_filter", |
|
|
|
|
grpc_metadata_batch_filter(&exec_ctx, calld->recv_initial_metadata, |
|
|
|
|
remove_consumed_md, elem, |
|
|
|
|
"Response metadata filtering error")); |
|
|
|
|
grpc_metadata_array_destroy(&calld->md); |
|
|
|
|
grpc_exec_ctx_sched(&exec_ctx, calld->on_done_recv, GRPC_ERROR_NONE, NULL); |
|
|
|
|
} else { |
|
|
|
|