From 77dcebd51fda2a390974d4ce8a1f7a33851f7ed5 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 4 Sep 2013 15:32:01 -0700 Subject: [PATCH] correct pool comparison for assignment distribution --- assignment-server/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assignment-server/src/main.cpp b/assignment-server/src/main.cpp index 145634fd32..7062cdfcc3 100644 --- a/assignment-server/src/main.cpp +++ b/assignment-server/src/main.cpp @@ -44,10 +44,11 @@ int main(int argc, const char* argv[]) { Assignment firstAssignment = assignmentQueue.front(); 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 // or that neither has a designated pool - if ((eitherHasPool && strcmp(firstAssignment.getPool(), requestAssignment.getPool())) + if ((eitherHasPool && bothHavePool && strcmp(firstAssignment.getPool(), requestAssignment.getPool()) == 0) || !eitherHasPool) { assignmentQueue.pop();