[server] Fix typo in the class name (#35216)

Closes #35216

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35216 from eugeneo:tasks/typo-aync d9f58bc130
PiperOrigin-RevId: 588146516
test_588131915
Eugene Ostroukhov 1 year ago committed by Copybara-Service
parent 2fa8018d2a
commit 1a086609d7
  1. 20
      src/cpp/server/secure_server_credentials.cc
  2. 6
      src/cpp/server/secure_server_credentials.h

@ -36,15 +36,15 @@
namespace grpc {
void AuthMetadataProcessorAyncWrapper::Destroy(void* wrapper) {
auto* w = static_cast<AuthMetadataProcessorAyncWrapper*>(wrapper);
void AuthMetadataProcessorAsyncWrapper::Destroy(void* wrapper) {
auto* w = static_cast<AuthMetadataProcessorAsyncWrapper*>(wrapper);
delete w;
}
void AuthMetadataProcessorAyncWrapper::Process(
void AuthMetadataProcessorAsyncWrapper::Process(
void* wrapper, grpc_auth_context* context, const grpc_metadata* md,
size_t num_md, grpc_process_auth_metadata_done_cb cb, void* user_data) {
auto* w = static_cast<AuthMetadataProcessorAyncWrapper*>(wrapper);
auto* w = static_cast<AuthMetadataProcessorAsyncWrapper*>(wrapper);
if (!w->processor_) {
// Early exit.
cb(user_data, nullptr, 0, nullptr, 0, GRPC_STATUS_OK, nullptr);
@ -52,8 +52,8 @@ void AuthMetadataProcessorAyncWrapper::Process(
}
if (w->processor_->IsBlocking()) {
w->thread_pool_->Add([w, context, md, num_md, cb, user_data] {
w->AuthMetadataProcessorAyncWrapper::InvokeProcessor(context, md, num_md,
cb, user_data);
w->AuthMetadataProcessorAsyncWrapper::InvokeProcessor(context, md, num_md,
cb, user_data);
});
} else {
// invoke directly.
@ -61,7 +61,7 @@ void AuthMetadataProcessorAyncWrapper::Process(
}
}
void AuthMetadataProcessorAyncWrapper::InvokeProcessor(
void AuthMetadataProcessorAsyncWrapper::InvokeProcessor(
grpc_auth_context* context, const grpc_metadata* md, size_t num_md,
grpc_process_auth_metadata_done_cb cb, void* user_data) {
AuthMetadataProcessor::InputMetadata metadata;
@ -104,10 +104,10 @@ int SecureServerCredentials::AddPortToServer(const std::string& addr,
void SecureServerCredentials::SetAuthMetadataProcessor(
const std::shared_ptr<grpc::AuthMetadataProcessor>& processor) {
auto* wrapper = new grpc::AuthMetadataProcessorAyncWrapper(processor);
auto* wrapper = new grpc::AuthMetadataProcessorAsyncWrapper(processor);
grpc_server_credentials_set_auth_metadata_processor(
creds_, {grpc::AuthMetadataProcessorAyncWrapper::Process,
grpc::AuthMetadataProcessorAyncWrapper::Destroy, wrapper});
creds_, {grpc::AuthMetadataProcessorAsyncWrapper::Process,
grpc::AuthMetadataProcessorAsyncWrapper::Destroy, wrapper});
}
std::shared_ptr<ServerCredentials> SslServerCredentials(

@ -35,7 +35,7 @@ namespace grpc {
class SecureServerCredentials;
class AuthMetadataProcessorAyncWrapper final {
class AuthMetadataProcessorAsyncWrapper final {
public:
static void Destroy(void* wrapper);
@ -43,7 +43,7 @@ class AuthMetadataProcessorAyncWrapper final {
const grpc_metadata* md, size_t num_md,
grpc_process_auth_metadata_done_cb cb, void* user_data);
explicit AuthMetadataProcessorAyncWrapper(
explicit AuthMetadataProcessorAsyncWrapper(
const std::shared_ptr<AuthMetadataProcessor>& processor)
: processor_(processor) {
if (processor && processor->IsBlocking()) {
@ -78,7 +78,7 @@ class SecureServerCredentials final : public ServerCredentials {
SecureServerCredentials* AsSecureServerCredentials() override { return this; }
grpc_server_credentials* creds_;
std::unique_ptr<grpc::AuthMetadataProcessorAyncWrapper> processor_;
std::unique_ptr<grpc::AuthMetadataProcessorAsyncWrapper> processor_;
};
} // namespace grpc

Loading…
Cancel
Save