From 1c61aa5f6fa94b96a24e74b88e8ad0c5a98f7696 Mon Sep 17 00:00:00 2001 From: Winchell Date: Fri, 21 Aug 2026 17:53:44 +0800 Subject: [PATCH 1/2] docs: fix build_with_bazel_module echo example Removed SSL certificate and private key configuration from server options. --- example/build_with_bazel_module/server.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/example/build_with_bazel_module/server.cpp b/example/build_with_bazel_module/server.cpp index 54ca096016..289b1afe13 100644 --- a/example/build_with_bazel_module/server.cpp +++ b/example/build_with_bazel_module/server.cpp @@ -83,8 +83,6 @@ int main(int argc, char* argv[]) { // Start the server. brpc::ServerOptions options; - options.mutable_ssl_options()->default_cert.certificate = "cert.pem"; - options.mutable_ssl_options()->default_cert.private_key = "key.pem"; options.idle_timeout_sec = FLAGS_idle_timeout_s; options.max_concurrency = FLAGS_max_concurrency; options.internal_port = FLAGS_internal_port; From dfa6c8542d36064d5ab3cc0acbf71524ebffd715 Mon Sep 17 00:00:00 2001 From: Winchell Date: Fri, 21 Aug 2026 17:58:15 +0800 Subject: [PATCH 2/2] Fix null pointer comments and usages in client.cpp --- example/build_with_bazel_module/client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/build_with_bazel_module/client.cpp b/example/build_with_bazel_module/client.cpp index 2ce335073b..0e04dacc8a 100644 --- a/example/build_with_bazel_module/client.cpp +++ b/example/build_with_bazel_module/client.cpp @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) { // Channel is thread-safe and can be shared by all threads in your program. brpc::Channel channel; - // Initialize the channel, NULL means using default options. + // Initialize the channel, nullptr means using default options. brpc::ChannelOptions options; options.protocol = FLAGS_protocol; options.connection_type = FLAGS_connection_type; @@ -69,9 +69,9 @@ int main(int argc, char* argv[]) { // being serialized into protobuf messages. cntl.request_attachment().append(FLAGS_attachment); - // Because `done'(last parameter) is NULL, this function waits until + // Because `done'(last parameter) is nullptr, this function waits until // the response comes back or error occurs(including timedout). - stub.Echo(&cntl, &request, &response, NULL); + stub.Echo(&cntl, &request, &response, nullptr); if (!cntl.Failed()) { LOG(INFO) << "Received response from " << cntl.remote_side() << " to " << cntl.local_side()