From 6a0377ea4c97c0df9e5e067ef8568a16e33ea27f Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 6 Nov 2024 12:00:13 -0800 Subject: [PATCH] [chttp2] Fix comments and messages (#38071) Fix https://github.com/grpc/grpc/issues/37859 Closes #38071 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38071 from yashykt:FixMessage a16d5f13c01ebcd03e07f3d902b35f06b7ac99c2 PiperOrigin-RevId: 693813129 --- .../transport/chttp2/client/chttp2_connector.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/src/core/ext/transport/chttp2/client/chttp2_connector.cc index 0223539a450..d381443bdea 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.cc +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc @@ -248,8 +248,7 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory { ChannelArgs args) { auto* channel_credentials = args.GetObject(); if (channel_credentials == nullptr) { - return absl::InternalError( - "channel credentials missing for secure channel"); + return absl::InternalError("channel credentials missing for channel"); } // Make sure security connector does not already exist in args. if (args.Contains(GRPC_ARG_SECURITY_CONNECTOR)) { @@ -269,8 +268,7 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory { /*call_creds=*/nullptr, authority->c_str(), &args); if (subchannel_security_connector == nullptr) { return absl::InternalError(absl::StrFormat( - "Failed to create secure subchannel for secure name '%s'", - *authority)); + "Failed to create subchannel for secure name '%s'", *authority)); } return args.SetObject(std::move(subchannel_security_connector)); } @@ -299,7 +297,7 @@ void FactoryInit() { } // namespace -// Create a secure client channel: +// Create a client channel: // Asynchronously: - resolve target // - connect to it (trying alternatives as presented) // - perform handshakes @@ -308,8 +306,8 @@ grpc_channel* grpc_channel_create(const char* target, const grpc_channel_args* c_args) { grpc_core::ExecCtx exec_ctx; GRPC_TRACE_LOG(api, INFO) - << "grpc_secure_channel_create(target=" << target - << ", creds=" << (void*)creds << ", args=" << (void*)c_args << ")"; + << "grpc_channel_create(target=" << target << ", creds=" << (void*)creds + << ", args=" << (void*)c_args << ")"; grpc_channel* channel = nullptr; grpc_error_handle error; if (creds != nullptr) { @@ -338,7 +336,7 @@ grpc_channel* grpc_channel_create(const char* target, status = static_cast(integer); } channel = grpc_lame_client_channel_create( - target, status, "Failed to create secure client channel"); + target, status, "Failed to create client channel"); } return channel; }