aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client/insecure_credentials.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/client/insecure_credentials.cc')
-rw-r--r--src/cpp/client/insecure_credentials.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc
index 8945b038de..5ad8784567 100644
--- a/src/cpp/client/insecure_credentials.cc
+++ b/src/cpp/client/insecure_credentials.cc
@@ -52,12 +52,15 @@ class InsecureCredentialsImpl GRPC_FINAL : public Credentials {
target, grpc_channel_create(target.c_str(), &channel_args)));
}
+ // InsecureCredentials should not be applied to a call.
+ bool ApplyToCall(grpc_call* call) GRPC_OVERRIDE { return false; }
+
SecureCredentials* AsSecureCredentials() GRPC_OVERRIDE { return nullptr; }
};
} // namespace
-std::unique_ptr<Credentials> InsecureCredentials() {
- return std::unique_ptr<Credentials>(new InsecureCredentialsImpl());
+std::shared_ptr<Credentials> InsecureCredentials() {
+ return std::shared_ptr<Credentials>(new InsecureCredentialsImpl());
}
} // namespace grpc