From 14929d4e35a6c4760fe9376e4aa8cb10d9411539 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 21 Sep 2015 20:57:26 -0700 Subject: [PATCH] Credentials plugin fixes (after the branch was merged). --- include/grpc++/security/credentials.h | 2 +- src/cpp/client/secure_credentials.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index 01b9710f6b3..fafcfdc9061 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -177,7 +177,7 @@ class MetadataCredentialsPlugin { // a different thread from the one processing the call. virtual bool IsBlocking() const { return true; } - // Gets the auth metatada produced by this plugin. */ + // Gets the auth metatada produced by this plugin. virtual Status GetMetadata( grpc::string_ref service_url, std::multimap* metadata) = 0; diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 8333b01f29b..99b7468e865 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -183,7 +183,7 @@ void MetadataCredentialsPluginWrapper::InvokePlugin( 0, {{nullptr, nullptr, nullptr, nullptr}}}); } - cb(user_data, &md[0], md.size(), + cb(user_data, md.empty() ? nullptr : &md[0], md.size(), static_cast(status.error_code()), status.error_message().c_str()); }