Skip to content

Commit

Permalink
Fix issue #278.
Browse files Browse the repository at this point in the history
  • Loading branch information
dchapyshev committed Dec 21, 2023
1 parent 4c13451 commit 7c20476
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions source/console/import_export_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,6 @@ constexpr int kMinCompressRatio = 1;
constexpr int kMaxCompressRatio = 22;
constexpr int kDefaultCompressRatio = 8;

//--------------------------------------------------------------------------------------------------
bool isValidSessionType(int session_type)
{
switch (static_cast<proto::SessionType>(session_type))
{
case proto::SESSION_TYPE_DESKTOP_MANAGE:
case proto::SESSION_TYPE_DESKTOP_VIEW:
case proto::SESSION_TYPE_FILE_TRANSFER:
case proto::SESSION_TYPE_SYSTEM_INFO:
case proto::SESSION_TYPE_TEXT_CHAT:
return true;

default:
return false;
}
}

//--------------------------------------------------------------------------------------------------
bool isValidVideoEncoding(int video_encoding)
{
Expand Down Expand Up @@ -401,11 +384,13 @@ int readComputerGroup(
}

QJsonObject json_config = json_computer_group["config"].toObject();
proto::address_book::ComputerGroupConfig session_config = readComputerGroupConfig(json_config);
proto::address_book::ComputerGroupConfig computer_group_config =
readComputerGroupConfig(json_config);

proto::address_book::ComputerGroup* computer_group = parent_group->add_computer_group();
computer_group->set_name(name.toStdString());
computer_group->set_comment(comment.toStdString());
computer_group->mutable_config()->CopyFrom(computer_group_config);
computer_group->set_expanded(false);

int count = 0;
Expand Down Expand Up @@ -531,7 +516,7 @@ QJsonObject writeComputerGroup(const proto::address_book::ComputerGroup& compute
{
QJsonObject json_computer_group =
writeComputerGroup(computer_group.computer_group(i), count);
json_computers.append(json_computer_group);
json_computer_groups.append(json_computer_group);
}

QJsonObject json_computer_group;
Expand Down

0 comments on commit 7c20476

Please sign in to comment.