cf-natali commented on a change in pull request #356: libprocess: check protobuf (de)serialisation
success.
URL: https://github.com/apache/mesos/pull/356#discussion_r405139102
##########
File path: 3rdparty/libprocess/include/process/protobuf.hpp
##########
@@ -329,13 +332,11 @@ class ProtobufProcess : public process::Process<T>
{
google::protobuf::Arena arena;
M* m = CHECK_NOTNULL(google::protobuf::Arena::CreateMessage<M>(&arena));
- m->ParseFromString(data);
- if (m->IsInitialized()) {
+ if (m->ParseFromString(data)) {
(t->*method)(*m);
} else {
- LOG(WARNING) << "Initialization errors: "
- << m->InitializationErrorString();
+ LOG(WARNING) << "Error deserialising: " << data;
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
|