diff options
Diffstat (limited to 'dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch')
-rw-r--r-- | dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch b/dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch new file mode 100644 index 000000000000..659885d406e3 --- /dev/null +++ b/dev-libs/libarcus/files/libarcus-4.8.0-deprecated-protobuf-calls.patch @@ -0,0 +1,30 @@ +--- a/src/Socket_p.h ++++ b/src/Socket_p.h +@@ -128,9 +128,6 @@ + + static const int keep_alive_rate = 500; //Number of milliseconds between sending keepalive packets + +- // This value determines when protobuf should warn about very large messages. +- static const int message_size_warning = 400 * 1048576; +- + // This value determines when protobuf should error out because the message is too large. + // Due to the way Protobuf is implemented, messages large than 512MiB will cause issues. + static const int message_size_maximum = 500 * 1048576; +@@ -362,7 +359,7 @@ + return; + } + +- uint32_t message_size = message->ByteSize(); ++ uint32_t message_size = message->ByteSizeLong(); + if(platform_socket.writeUInt32(message_size) == -1) + { + error(ErrorCode::SendFailedError, "Could not send message size"); +@@ -548,7 +545,7 @@ + + google::protobuf::io::ArrayInputStream array(wire_message->data, wire_message->size); + google::protobuf::io::CodedInputStream stream(&array); +- stream.SetTotalBytesLimit(message_size_maximum, message_size_warning); ++ stream.SetTotalBytesLimit(message_size_maximum); + if(!message->ParseFromCodedStream(&stream)) + { + error(ErrorCode::ParseFailedError, "Failed to parse message:" + std::string(wire_message->data)); |