fix packing and unpacking of agent IDs

This commit is contained in:
Stephen Birarda 2013-04-15 11:12:31 -07:00
parent b929f14648
commit 24689e97ab

View file

@ -427,11 +427,11 @@ void AgentList::stopDomainServerCheckInThread() {
}
int unpackAgentId(unsigned char *packedData, uint16_t *agentId) {
memcpy(packedData, agentId, sizeof(uint16_t));
memcpy(agentId, packedData, sizeof(uint16_t));
return sizeof(uint16_t);
}
int packAgentId(unsigned char *packStore, uint16_t agentId) {
memcpy(&agentId, packStore, sizeof(uint16_t));
memcpy(packStore, &agentId, sizeof(uint16_t));
return sizeof(uint16_t);
}