Hello all,

I have a Message type EventStatus with the following definition:

message EventStatus {
     required int32 reason = 1;
     required string msg = 2;
}

This is part of a larger protocol where a C++ client sends an event to
a Java server where it is handled. The Java server returns an
EventStatus. If the reason field is 0 (success), protobuf parser on C+
+ side does not read the value of the msg field. If the reason field
is > 0, then it works fine. As a workaround I reversed the order of
the two fields:

message EventStatus {
     required string msg = 1;
     required int32 reason = 2;
}

Now the msg field is read even when reason is zero.

Why this strange behavior? Is this a known bug is protobuf?

Thanks,

-- Vijay
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to