mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-30 15:13:57 +00:00
1. Updated 'method' property of InboundMessage to be enumerable
2. Added memory check to ptrs structure 3. Fixed bug with remoteInterface's flags
This commit is contained in:
@@ -56,7 +56,7 @@ struct ILibAsyncUDPSocket_Data
|
||||
void ILibAsyncUDPSocket_OnDataSink(ILibAsyncSocket_SocketModule socketModule, char* buffer, int *p_beginPointer, int endPointer, ILibAsyncSocket_OnInterrupt* OnInterrupt, void **user, int *PAUSE)
|
||||
{
|
||||
struct ILibAsyncUDPSocket_Data *data = (struct ILibAsyncUDPSocket_Data*)*user;
|
||||
char RemoteAddress[8 + sizeof(struct sockaddr_in6)];
|
||||
char RemoteAddress[16 + sizeof(struct sockaddr_in6)] = { 0 };
|
||||
UNREFERENCED_PARAMETER( OnInterrupt );
|
||||
UNREFERENCED_PARAMETER( RemoteAddress );
|
||||
ILibAsyncSocket_GetRemoteInterface(socketModule, (struct sockaddr*)&RemoteAddress);
|
||||
|
||||
@@ -5625,7 +5625,7 @@ void ILibStun_CreateDtlsSession(struct ILibStun_Module *obj, int sessionId, int
|
||||
if (obj->dTlsSessions[sessionId] == NULL)
|
||||
{
|
||||
void *mem;
|
||||
obj->dTlsSessions[sessionId] = ILibMemory_Allocate(sizeof(struct ILibStun_dTlsSession), 8 + sizeof(struct sockaddr_in6), NULL, &mem);
|
||||
obj->dTlsSessions[sessionId] = ILibMemory_Allocate(sizeof(struct ILibStun_dTlsSession), 16 + sizeof(struct sockaddr_in6), NULL, &mem);
|
||||
obj->dTlsSessions[sessionId]->remoteInterface = (struct sockaddr_in6*)mem;
|
||||
((int*)((char*)mem + sizeof(struct sockaddr_in6)))[0] = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user