fix agent comparison for add of agent

This commit is contained in:
Stephen Birarda 2013-02-13 20:17:35 -08:00
parent 9de42bdf75
commit 7f35fe9993

View file

@ -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;