mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:17:14 +02:00
correct pool comparison for assignment distribution
This commit is contained in:
parent
2c32a1a048
commit
77dcebd51f
1 changed files with 2 additions and 1 deletions
|
@ -44,10 +44,11 @@ int main(int argc, const char* argv[]) {
|
||||||
Assignment firstAssignment = assignmentQueue.front();
|
Assignment firstAssignment = assignmentQueue.front();
|
||||||
|
|
||||||
bool eitherHasPool = (firstAssignment.getPool() || requestAssignment.getPool());
|
bool eitherHasPool = (firstAssignment.getPool() || requestAssignment.getPool());
|
||||||
|
bool bothHavePool = (firstAssignment.getPool() && requestAssignment.getPool());
|
||||||
|
|
||||||
// make sure there is a pool match for the created and requested assignment
|
// make sure there is a pool match for the created and requested assignment
|
||||||
// or that neither has a designated pool
|
// or that neither has a designated pool
|
||||||
if ((eitherHasPool && strcmp(firstAssignment.getPool(), requestAssignment.getPool()))
|
if ((eitherHasPool && bothHavePool && strcmp(firstAssignment.getPool(), requestAssignment.getPool()) == 0)
|
||||||
|| !eitherHasPool) {
|
|| !eitherHasPool) {
|
||||||
assignmentQueue.pop();
|
assignmentQueue.pop();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue