Credentials plugin fixes (after the branch was merged).

pull/3406/head
Julien Boeuf 9 years ago
parent ed299d182b
commit 14929d4e35
  1. 2
      include/grpc++/security/credentials.h
  2. 2
      src/cpp/client/secure_credentials.cc

@ -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;

@ -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());
}

Loading…
Cancel
Save