diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index 9ec5d24031f6e..fd198898d2f8a 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -36,15 +36,15 @@ namespace grpc { -void AuthMetadataProcessorAyncWrapper::Destroy(void* wrapper) { - auto* w = static_cast(wrapper); +void AuthMetadataProcessorAsyncWrapper::Destroy(void* wrapper) { + auto* w = static_cast(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(wrapper); + auto* w = static_cast(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& 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 SslServerCredentials( diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h index ca90a25f4f245..a62e51f2c24e3 100644 --- a/src/cpp/server/secure_server_credentials.h +++ b/src/cpp/server/secure_server_credentials.h @@ -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& 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 processor_; + std::unique_ptr processor_; }; } // namespace grpc