Bugfix for server-client communication

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1965 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hellwig
2012-11-30 18:13:13 +00:00
parent c689c159fb
commit fc1d21fe53
2 changed files with 45 additions and 38 deletions

View File

@ -255,12 +255,16 @@ void CommThread::sendPendingExperimentData(Minion& minion)
temp_exp->setWorkloadID(workloadID); // store ID for identification when receiving result
ctrlmsg.add_workloadid(workloadID);
exp.push_back(temp_exp);
} else {
break;
}
if (!m_js.m_runningJobs.insert(workloadID, temp_exp)) {
cout << "!![Server]could not insert workload id: [" << workloadID << "] double entry?" << endl;
sleep(10);
}
}
if (exp.size() != 0) {
ctrlmsg.set_job_size(exp.size());
cout << " >>[";
@ -281,6 +285,7 @@ void CommThread::sendPendingExperimentData(Minion& minion)
}
return;
}
}
#ifndef __puma
// Prevent receiveExperimentResults from modifying (or indirectly, via

View File

@ -148,6 +148,7 @@ FailControlMessage_Command JobClient::tryToGetExperimentData(ExperimentData& exp
}
close(m_sockfd);
if (m_parameters.size() != 0) {
//Take front from m_parameters and copy to exp.
exp.getMessage().CopyFrom(m_parameters.front()->getMessage());
exp.setWorkloadID(m_parameters.front()->getWorkloadID());
@ -157,6 +158,7 @@ FailControlMessage_Command JobClient::tryToGetExperimentData(ExperimentData& exp
m_parameters.erase(m_parameters.begin());
//start time measurement for throughput calculation
m_job_runtime.startTimer();
}
return ctrlmsg.command();
}