aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/patches/02-protobuf-1.patch
blob: d0116087549673555825ce9f352a49aba0cf1ba3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc
index f26f007..ceca602 100644
--- a/src/cpp/ext/proto_server_reflection.cc
+++ b/src/cpp/ext/proto_server_reflection.cc
@@ -94,7 +94,7 @@ Status ProtoServerReflection::ServerReflectionInfo(
 void ProtoServerReflection::FillErrorResponse(const Status& status,
                                               ErrorResponse* error_response) {
   error_response->set_error_code(status.error_code());
-  error_response->set_error_message(status.error_message());
+  error_response->set_error_message(TProtoStringType(status.error_message()));
 }
 
 Status ProtoServerReflection::ListService(ServerContext* /*context*/,
@@ -104,7 +104,7 @@ Status ProtoServerReflection::ListService(ServerContext* /*context*/,
   }
   for (const auto& value : *services_) {
     ServiceResponse* service_response = response->add_service();
-    service_response->set_name(value);
+    service_response->set_name(TProtoStringType(value));
   }
   return Status::OK;
 }
@@ -116,7 +116,7 @@ Status ProtoServerReflection::GetFileByName(
   }

   const protobuf::FileDescriptor* file_desc =
-      descriptor_pool_->FindFileByName(file_name);
+      descriptor_pool_->FindFileByName(TProtoStringType(file_name));
   if (file_desc == nullptr) {
     return Status(StatusCode::NOT_FOUND, "File not found.");
   }
@@ -134,7 +134,7 @@ Status ProtoServerReflection::GetFileContainingSymbol(
   }
 
   const protobuf::FileDescriptor* file_desc =
-      descriptor_pool_->FindFileContainingSymbol(symbol);
+      descriptor_pool_->FindFileContainingSymbol(TProtoStringType(symbol));
   if (file_desc == nullptr) {
     return Status(StatusCode::NOT_FOUND, "Symbol not found.");
   }
@@ -175,7 +175,7 @@ Status ProtoServerReflection::GetAllExtensionNumbers(
   }
 
   const protobuf::Descriptor* desc =
-      descriptor_pool_->FindMessageTypeByName(type);
+      descriptor_pool_->FindMessageTypeByName(TProtoStringType(type));
   if (desc == nullptr) {
     return Status(StatusCode::NOT_FOUND, "Type not found.");
   }
@@ -185,7 +185,7 @@ Status ProtoServerReflection::GetAllExtensionNumbers(
   for (const auto& value : extensions) {
     response->add_extension_number(value->number());
   }
-  response->set_base_type_name(type);
+  response->set_base_type_name(TProtoStringType(type));
   return Status::OK;
 }
 
@@ -199,7 +199,7 @@ void ProtoServerReflection::FillFileDescriptorResponse(
   seen_files->insert(file_desc->name());
 
   protobuf::FileDescriptorProto file_desc_proto;
-  TString data;
+  TProtoStringType data;
   file_desc->CopyTo(&file_desc_proto);
   file_desc_proto.SerializeToString(&data);
   response->mutable_file_descriptor_response()->add_file_descriptor_proto(data);