From 7bdc813329efe8960963a7ab5e90961a3e05e423 Mon Sep 17 00:00:00 2001 From: Oblivion Date: Mon, 13 Dec 2021 16:29:07 +0000 Subject: [PATCH 1/3] use StringPiece --- exporters/otlp/src/otlp_http_client.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exporters/otlp/src/otlp_http_client.cc b/exporters/otlp/src/otlp_http_client.cc index e20236877f..13d2ec2208 100644 --- a/exporters/otlp/src/otlp_http_client.cc +++ b/exporters/otlp/src/otlp_http_client.cc @@ -21,6 +21,7 @@ #include "google/protobuf/stubs/common.h" #if defined(GOOGLE_PROTOBUF_VERSION) && GOOGLE_PROTOBUF_VERSION >= 3007000 +# include "google/protobuf/stubs/stringpiece.h" # include "google/protobuf/stubs/strutil.h" #else # include "google/protobuf/stubs/port.h" @@ -28,7 +29,7 @@ namespace google { namespace protobuf { -LIBPROTOBUF_EXPORT int Base64Escape(const unsigned char *src, int slen, char *dest, int szdest); +LIBPROTOBUF_EXPORT int Base64Escape(StringPiece src, std::string *dest); } // namespace protobuf } // namespace google #endif From 701c03d7fc8524c3b2f935e3fa6d8aa201bf0784 Mon Sep 17 00:00:00 2001 From: Oblivion Date: Mon, 13 Dec 2021 16:31:35 +0000 Subject: [PATCH 2/3] fix return type --- exporters/otlp/src/otlp_http_client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/otlp/src/otlp_http_client.cc b/exporters/otlp/src/otlp_http_client.cc index 13d2ec2208..5cff7fe201 100644 --- a/exporters/otlp/src/otlp_http_client.cc +++ b/exporters/otlp/src/otlp_http_client.cc @@ -29,7 +29,7 @@ namespace google { namespace protobuf { -LIBPROTOBUF_EXPORT int Base64Escape(StringPiece src, std::string *dest); +LIBPROTOBUF_EXPORT void Base64Escape(StringPiece src, std::string *dest); } // namespace protobuf } // namespace google #endif From 3b1ec757ea367ce16a3206b62b07153d45473b9e Mon Sep 17 00:00:00 2001 From: Ehsan Saei <71217171+esigo@users.noreply.github.com> Date: Mon, 13 Dec 2021 19:36:41 +0100 Subject: [PATCH 3/3] comments --- exporters/otlp/src/otlp_http_client.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/exporters/otlp/src/otlp_http_client.cc b/exporters/otlp/src/otlp_http_client.cc index 5cff7fe201..2864af46a0 100644 --- a/exporters/otlp/src/otlp_http_client.cc +++ b/exporters/otlp/src/otlp_http_client.cc @@ -21,7 +21,6 @@ #include "google/protobuf/stubs/common.h" #if defined(GOOGLE_PROTOBUF_VERSION) && GOOGLE_PROTOBUF_VERSION >= 3007000 -# include "google/protobuf/stubs/stringpiece.h" # include "google/protobuf/stubs/strutil.h" #else # include "google/protobuf/stubs/port.h"