2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00

AuthAccount

This commit is contained in:
2024-06-22 16:13:19 +03:00
parent 3a89a108db
commit c17191a7bf
2 changed files with 29 additions and 6 deletions

View File

@ -131,6 +131,12 @@ public class IIPAuthPacket : Packet
set;
}
public byte[] AccountId
{
get;
set;
}
public TransmissionType? DataType
{
get;
@ -408,7 +414,7 @@ public class IIPAuthPacket : Packet
}
else if (Event == IIPAuthPacketEvent.IndicationEstablished)
{
if (NotEnough(offset, ends, 1))
if (NotEnough(offset, ends, 2))
return -dataLengthNeeded;
var sessionLength = data[offset++];
@ -419,6 +425,18 @@ public class IIPAuthPacket : Packet
SessionId = data.Clip(offset, sessionLength);
offset += sessionLength;
if (NotEnough(offset, ends, 1))
return -dataLengthNeeded;
var accountLength = data[offset++];
if (NotEnough(offset, ends, accountLength))
return -dataLengthNeeded;
AccountId = data.Clip(offset, accountLength);
offset += accountLength;
}
else if (Event == IIPAuthPacketEvent.IAuthPlain