compare ports of same endianess for agent comparison

This commit is contained in:
Stephen Birarda 2013-02-13 14:06:06 -08:00
parent 28beb3ecfc
commit a725db5bd7

View file

@ -68,7 +68,7 @@ int addAgent(sockaddr_in agentAddress, void *audioData) {
for (i = 0; i < numAgents; i++) {
if (strcmp(inet_ntoa(agentAddress.sin_addr), agents[i].address) == 0
&& agentAddress.sin_port == agents[i].port) {
&& ntohs(agentAddress.sin_port) == agents[i].port) {
break;
}
}