mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
same IP but different port is a new agent
This commit is contained in:
parent
5196a1ba1b
commit
9de42bdf75
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue