mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-15 05:05:57 +02:00
Merge pull request #45 from birarda/agent-id
fix packing and unpacking of agent IDs
This commit is contained in:
commit
07b5e86b8a
1 changed files with 2 additions and 2 deletions
|
@ -427,11 +427,11 @@ void AgentList::stopDomainServerCheckInThread() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int unpackAgentId(unsigned char *packedData, uint16_t *agentId) {
|
int unpackAgentId(unsigned char *packedData, uint16_t *agentId) {
|
||||||
memcpy(packedData, agentId, sizeof(uint16_t));
|
memcpy(agentId, packedData, sizeof(uint16_t));
|
||||||
return sizeof(uint16_t);
|
return sizeof(uint16_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
int packAgentId(unsigned char *packStore, uint16_t agentId) {
|
int packAgentId(unsigned char *packStore, uint16_t agentId) {
|
||||||
memcpy(&agentId, packStore, sizeof(uint16_t));
|
memcpy(packStore, &agentId, sizeof(uint16_t));
|
||||||
return sizeof(uint16_t);
|
return sizeof(uint16_t);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue