Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
hfedcba committed Jul 11, 2018
2 parents e03d4ac + 9326396 commit a13282d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/IpcClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,22 +483,22 @@ Ipc::PVariable IpcClient::broadcastEvent(Ipc::PArray& parameters)
{
try
{
if(parameters->size() != 4) return Ipc::Variable::createError(-1, "Wrong parameter count.");
if(parameters->size() != 5) return Ipc::Variable::createError(-1, "Wrong parameter count.");

std::lock_guard<std::mutex> variablesGuard(_variablesMutex);
auto variablesIterator = _variables.find(parameters->at(0)->integerValue64);
auto variablesIterator = _variables.find(parameters->at(1)->integerValue64);
if(variablesIterator != _variables.end())
{
auto channelsIterator = variablesIterator->second.find(parameters->at(1)->integerValue64);
auto channelsIterator = variablesIterator->second.find(parameters->at(2)->integerValue64);
if(channelsIterator != variablesIterator->second.end())
{
for(uint32_t i = 0; i < parameters->at(2)->arrayValue->size(); ++i)
for(uint32_t i = 0; i < parameters->at(3)->arrayValue->size(); ++i)
{
parameters->at(2)->arrayValue->at(i)->stringValue = stripNonAlphaNumeric(parameters->at(2)->arrayValue->at(i)->stringValue);
auto variableIterator = channelsIterator->second.find(parameters->at(2)->arrayValue->at(i)->stringValue);
parameters->at(3)->arrayValue->at(i)->stringValue = stripNonAlphaNumeric(parameters->at(3)->arrayValue->at(i)->stringValue);
auto variableIterator = channelsIterator->second.find(parameters->at(3)->arrayValue->at(i)->stringValue);
if(variableIterator != channelsIterator->second.end())
{
GD::db->saveValue(parameters->at(0)->integerValue64, parameters->at(1)->integerValue64, parameters->at(2)->arrayValue->at(i)->stringValue, parameters->at(3)->arrayValue->at(i));
GD::db->saveValue(parameters->at(1)->integerValue64, parameters->at(2)->integerValue64, parameters->at(3)->arrayValue->at(i)->stringValue, parameters->at(4)->arrayValue->at(i));
}
}
}
Expand Down

0 comments on commit a13282d

Please sign in to comment.