02-protobuf-1.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc
  2. index f26f007..ceca602 100644
  3. --- a/src/cpp/ext/proto_server_reflection.cc
  4. +++ b/src/cpp/ext/proto_server_reflection.cc
  5. @@ -116,7 +116,7 @@ Status ProtoServerReflection::GetFileByName(
  6. }
  7. const protobuf::FileDescriptor* file_desc =
  8. - descriptor_pool_->FindFileByName(file_name);
  9. + descriptor_pool_->FindFileByName(TProtoStringType(file_name));
  10. if (file_desc == nullptr) {
  11. return Status(StatusCode::NOT_FOUND, "File not found.");
  12. }
  13. @@ -134,7 +134,7 @@ Status ProtoServerReflection::GetFileContainingSymbol(
  14. }
  15. const protobuf::FileDescriptor* file_desc =
  16. - descriptor_pool_->FindFileContainingSymbol(symbol);
  17. + descriptor_pool_->FindFileContainingSymbol(TProtoStringType(symbol));
  18. if (file_desc == nullptr) {
  19. return Status(StatusCode::NOT_FOUND, "Symbol not found.");
  20. }
  21. @@ -175,7 +175,7 @@ Status ProtoServerReflection::GetAllExtensionNumbers(
  22. }
  23. const protobuf::Descriptor* desc =
  24. - descriptor_pool_->FindMessageTypeByName(type);
  25. + descriptor_pool_->FindMessageTypeByName(TProtoStringType(type));
  26. if (desc == nullptr) {
  27. return Status(StatusCode::NOT_FOUND, "Type not found.");
  28. }
  29. @@ -199,7 +199,7 @@ void ProtoServerReflection::FillFileDescriptorResponse(
  30. seen_files->insert(file_desc->name());
  31. protobuf::FileDescriptorProto file_desc_proto;
  32. - TString data;
  33. + TProtoStringType data;
  34. file_desc->CopyTo(&file_desc_proto);
  35. file_desc_proto.SerializeToString(&data);
  36. response->mutable_file_descriptor_response()->add_file_descriptor_proto(data);