Skip to content
Snippets Groups Projects
Commit 19cf3942 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

conference_protocol: avoid JSON exceptions on wrong keys

version and layout contains integer, so the JSON parse will throw
if the value is parsed

Change-Id: I77b0705ec1ca0b127dfe714877c69bb7fc2d80ef
parent 6f71e583
No related branches found
No related tags found
No related merge requests found
......@@ -119,9 +119,12 @@ ConfProtocolParser::parseV1()
auto isPeerModerator = checkAuthorization_(peerId_);
for (Json::Value::const_iterator itr = data_.begin(); itr != data_.end(); itr++) {
auto key = itr.key();
if (isPeerModerator && key == ProtocolKeys::LAYOUT) {
if (key == ProtocolKeys::LAYOUT) {
// Note: can be removed soon
setLayout_(itr->asInt());
if (isPeerModerator)
setLayout_(itr->asInt());
} else if (key == ProtocolKeys::PROTOVERSION) {
continue;
} else {
auto accValue = *itr;
if (accValue.isMember(ProtocolKeys::DEVICES)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment