diff options
-rw-r--r-- | include/grpc++/security/credentials.h | 2 | ||||
-rw-r--r-- | 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 01b9710f6b..fafcfdc906 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<grpc::string, grpc::string_ref>* metadata) = 0; diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 8333b01f29..99b7468e86 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<grpc_status_code>(status.error_code()), status.error_message().c_str()); } |