mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-23 11:43:26 +00:00
1. Fixed compiler warning
2. Updated so process.exit() throws exception when called in agent mode
This commit is contained in:
@@ -1427,7 +1427,7 @@ int ILib_Stun_GetAttributeChangeRequestPacket(int flags, char* TransactionId, ch
|
||||
((unsigned int*)rbuffer)[1] = htonl(0x2112A442); // Set the magic string
|
||||
util_random(12, TransactionId); // Random used for transaction id
|
||||
|
||||
TransactionId[0] = 255; // Set the first byte to 255, so it doesn't collide with IceStateSlot
|
||||
TransactionId[0] = (char)255; // Set the first byte to 255, so it doesn't collide with IceStateSlot
|
||||
memcpy_s(rbuffer + 8, 12, TransactionId, 12);
|
||||
|
||||
((unsigned short*)(rbuffer + rptr))[0] = htons(STUN_ATTRIB_CHANGE_REQUEST); // Attribute header
|
||||
@@ -1449,8 +1449,8 @@ void ILib_Stun_SendAttributeChangeRequest(void* module, struct sockaddr* StunSer
|
||||
((unsigned int*)rbuffer)[1] = htonl(0x2112A442); // Set the magic string
|
||||
util_random(12, StunModule->TransactionId); // Random used for transaction id
|
||||
|
||||
StunModule->TransactionId[0] = 255; // Set the first byte to 255, so it doesn't collide with IceStateSlot
|
||||
NAT_MAPPING_DETECTION(StunModule->TransactionId) = ((flags & 0x8000)==0x8000)?255:0; // Mapping Detection vs Public Interface Only Detection
|
||||
StunModule->TransactionId[0] = (char)255; // Set the first byte to 255, so it doesn't collide with IceStateSlot
|
||||
NAT_MAPPING_DETECTION(StunModule->TransactionId) = (char)((flags & 0x8000)==0x8000)?(char)255:0; // Mapping Detection vs Public Interface Only Detection
|
||||
memcpy_s(rbuffer + 8, sizeof(rbuffer) - 8, StunModule->TransactionId, 12);
|
||||
|
||||
((unsigned short*)(rbuffer + rptr))[0] = htons(STUN_ATTRIB_CHANGE_REQUEST); // Attribute header
|
||||
|
||||
Reference in New Issue
Block a user