aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/common/channel_filter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/common/channel_filter.cc')
-rw-r--r--src/cpp/common/channel_filter.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cpp/common/channel_filter.cc b/src/cpp/common/channel_filter.cc
index 253614ca9b..c0dc9dd63e 100644
--- a/src/cpp/common/channel_filter.cc
+++ b/src/cpp/common/channel_filter.cc
@@ -36,8 +36,6 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/cpp/common/channel_filter.h"
-#include <grpc++/impl/codegen/slice.h>
-
namespace grpc {
// MetadataBatch
@@ -47,10 +45,8 @@ grpc_linked_mdelem *MetadataBatch::AddMetadata(grpc_exec_ctx *exec_ctx,
const string &value) {
grpc_linked_mdelem *storage = new grpc_linked_mdelem;
memset(storage, 0, sizeof(grpc_linked_mdelem));
- storage->md = grpc_mdelem_from_slices(exec_ctx, SliceFromCopiedString(key),
- SliceFromCopiedString(value));
- GRPC_LOG_IF_ERROR("MetadataBatch::AddMetadata",
- grpc_metadata_batch_link_head(exec_ctx, batch_, storage));
+ storage->md = grpc_mdelem_from_strings(exec_ctx, key.c_str(), value.c_str());
+ grpc_metadata_batch_link_head(batch_, storage);
return storage;
}