mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +02:00
Switching to unsigned
This commit is contained in:
parent
9e0df2dbd1
commit
e396269d78
3 changed files with 8 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
Agent::Agent() {}
|
||||
|
||||
Agent::Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, int16_t thisAgentId) {
|
||||
Agent::Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, uint16_t thisAgentId) {
|
||||
publicSocket = new sockaddr;
|
||||
memcpy(publicSocket, agentPublicSocket, sizeof(sockaddr));
|
||||
|
||||
|
@ -76,11 +76,11 @@ void Agent::setType(char newType) {
|
|||
type = newType;
|
||||
}
|
||||
|
||||
int16_t Agent::getAgentId() {
|
||||
uint16_t Agent::getAgentId() {
|
||||
return agentId;
|
||||
}
|
||||
|
||||
void Agent::setAgentId(int16_t thisAgentId) {
|
||||
void Agent::setAgentId(uint16_t thisAgentId) {
|
||||
agentId = thisAgentId;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
class Agent {
|
||||
public:
|
||||
Agent();
|
||||
Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, int16_t thisAgentId);
|
||||
Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, uint16_t thisAgentId);
|
||||
Agent(const Agent &otherAgent);
|
||||
~Agent();
|
||||
Agent& operator=(Agent otherAgent);
|
||||
|
@ -25,8 +25,8 @@ class Agent {
|
|||
bool matches(sockaddr *otherPublicSocket, sockaddr *otherLocalSocket, char otherAgentType);
|
||||
char getType();
|
||||
void setType(char newType);
|
||||
int16_t getAgentId();
|
||||
void setAgentId(int16_t thisAgentId);
|
||||
uint16_t getAgentId();
|
||||
void setAgentId(uint16_t thisAgentId);
|
||||
double getFirstRecvTimeUsecs();
|
||||
void setFirstRecvTimeUsecs(double newTimeUsecs);
|
||||
double getLastRecvTimeUsecs();
|
||||
|
@ -46,7 +46,7 @@ class Agent {
|
|||
void swap(Agent &first, Agent &second);
|
||||
sockaddr *publicSocket, *localSocket, *activeSocket;
|
||||
char type;
|
||||
int16_t agentId;
|
||||
uint16_t agentId;
|
||||
double firstRecvTimeUsecs;
|
||||
double lastRecvTimeUsecs;
|
||||
AgentData *linkedData;
|
||||
|
|
|
@ -45,7 +45,7 @@ class AgentList {
|
|||
UDPSocket agentSocket;
|
||||
std::vector<Agent> agents;
|
||||
pthread_t removeSilentAgentsThread;
|
||||
int16_t lastAgentId;
|
||||
uint16_t lastAgentId;
|
||||
int indexOfMatchingAgent(sockaddr *senderAddress);
|
||||
void handlePingReply(sockaddr *agentAddress);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue