From 7f35fe9993be039e0168b4dc9f7b794dacc9150f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 13 Feb 2013 20:17:35 -0800 Subject: [PATCH] fix agent comparison for add of agent --- domain/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain/src/main.cpp b/domain/src/main.cpp index dc53bbdbaa..4202400ece 100644 --- a/domain/src/main.cpp +++ b/domain/src/main.cpp @@ -103,7 +103,7 @@ int addAgent(uint32_t ip, in_port_t port, char agentType, float x, float y, floa // Search for agent in list and add if needed int i = 0; int is_new = 0; - while ((ip != agents[i].ip && port != agents[i].port) && (i < num_agents)) { + while ((ip != agents[i].ip || port != agents[i].port) && (i < num_agents)) { i++; } if ((i == num_agents) || (agents[i].active == false)) is_new = 1;