From 9de42bdf75a36cdc21389236333ccd15171d8358 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 13 Feb 2013 19:36:42 -0800 Subject: [PATCH] same IP but different port is a new 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 f31f9028da..dc53bbdbaa 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) && (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;