diff options
Diffstat (limited to 'implementation/service_discovery/src/option_impl.cpp')
-rwxr-xr-x | implementation/service_discovery/src/option_impl.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/implementation/service_discovery/src/option_impl.cpp b/implementation/service_discovery/src/option_impl.cpp index 71bbc6a..cff6d61 100755 --- a/implementation/service_discovery/src/option_impl.cpp +++ b/implementation/service_discovery/src/option_impl.cpp @@ -56,12 +56,8 @@ bool option_impl::deserialize(vsomeip::deserializer *_from) { break;
default:
type_ = option_type_e::UNKNOWN;
- // reduce remaining bytes of the deserializer by the length of
- // the unknown option to make it look like it was deserialized.
- // - 1 because the reserved byte which is included in the length
- // was already deserialized (s. above)
- std::size_t remaining = _from->get_remaining();
- _from->set_remaining(remaining - (length_ - 1));
+ // No valid option type --> ignore the remaining parts of the message!
+ _from->set_remaining(0);
}
}
|