mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-06-28 11:55:08 +03:00
spelling: attribute
This commit is contained in:
parent
1df21858e0
commit
c6b2b7c051
@ -137,7 +137,7 @@ void SstpProcessControlPacket(SSTP_SERVER *s, SSTP_PACKET *p)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug("SSTP Control Packet Recv: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttibuteList));
|
Debug("SSTP Control Packet Recv: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttributeList));
|
||||||
|
|
||||||
switch (p->MessageType)
|
switch (p->MessageType)
|
||||||
{
|
{
|
||||||
@ -266,7 +266,7 @@ void SstpSendPacket(SSTP_SERVER *s, SSTP_PACKET *p)
|
|||||||
|
|
||||||
if (p->IsControl)
|
if (p->IsControl)
|
||||||
{
|
{
|
||||||
Debug("SSTP Control Packet Send: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttibuteList));
|
Debug("SSTP Control Packet Send: Msg = %u, Num = %u\n", p->MessageType, LIST_NUM(p->AttributeList));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -438,7 +438,7 @@ SSTP_PACKET *SstpNewControlPacketWithAnAttribute(USHORT message_type, SSTP_ATTRI
|
|||||||
|
|
||||||
if (a != NULL)
|
if (a != NULL)
|
||||||
{
|
{
|
||||||
Add(p->AttibuteList, a);
|
Add(p->AttributeList, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
@ -452,7 +452,7 @@ SSTP_PACKET *SstpNewControlPacket(USHORT message_type)
|
|||||||
p->IsControl = true;
|
p->IsControl = true;
|
||||||
p->MessageType = message_type;
|
p->MessageType = message_type;
|
||||||
p->Version = SSTP_VERSION_1;
|
p->Version = SSTP_VERSION_1;
|
||||||
p->AttibuteList = NewListFast(NULL);
|
p->AttributeList = NewListFast(NULL);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
@ -469,7 +469,7 @@ SSTP_PACKET *SstpNewDataPacket(UCHAR *data, UINT size)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the Attibute with the specified ID from SSTP packet
|
// Get the Attribute with the specified ID from SSTP packet
|
||||||
SSTP_ATTRIBUTE *SstpFindAttribute(SSTP_PACKET *p, UCHAR attribute_id)
|
SSTP_ATTRIBUTE *SstpFindAttribute(SSTP_PACKET *p, UCHAR attribute_id)
|
||||||
{
|
{
|
||||||
UINT i;
|
UINT i;
|
||||||
@ -479,9 +479,9 @@ SSTP_ATTRIBUTE *SstpFindAttribute(SSTP_PACKET *p, UCHAR attribute_id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0;i < LIST_NUM(p->AttibuteList);i++)
|
for (i = 0;i < LIST_NUM(p->AttributeList);i++)
|
||||||
{
|
{
|
||||||
SSTP_ATTRIBUTE *a = LIST_DATA(p->AttibuteList, i);
|
SSTP_ATTRIBUTE *a = LIST_DATA(p->AttributeList, i);
|
||||||
|
|
||||||
if (a->AttributeId == attribute_id)
|
if (a->AttributeId == attribute_id)
|
||||||
{
|
{
|
||||||
@ -665,7 +665,7 @@ BUF *SstpBuildPacket(SSTP_PACKET *p)
|
|||||||
Free(p->Data);
|
Free(p->Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
ab = SstpBuildAttributeList(p->AttibuteList, p->MessageType);
|
ab = SstpBuildAttributeList(p->AttributeList, p->MessageType);
|
||||||
p->Data = ab->Buf;
|
p->Data = ab->Buf;
|
||||||
p->DataSize = ab->Size;
|
p->DataSize = ab->Size;
|
||||||
Free(ab);
|
Free(ab);
|
||||||
@ -753,9 +753,9 @@ SSTP_PACKET *SstpParsePacket(UCHAR *data, UINT size)
|
|||||||
if (p->IsControl)
|
if (p->IsControl)
|
||||||
{
|
{
|
||||||
// Parse the Attribute list
|
// Parse the Attribute list
|
||||||
p->AttibuteList = SstpParseAttributeList(p->Data, p->DataSize, p);
|
p->AttributeList = SstpParseAttributeList(p->Data, p->DataSize, p);
|
||||||
|
|
||||||
if (p->AttibuteList == NULL)
|
if (p->AttributeList == NULL)
|
||||||
{
|
{
|
||||||
// Failure of parsing list
|
// Failure of parsing list
|
||||||
SstpFreePacket(p);
|
SstpFreePacket(p);
|
||||||
@ -794,7 +794,7 @@ LIST *SstpParseAttributeList(UCHAR *data, UINT size, SSTP_PACKET *p)
|
|||||||
data += sizeof(USHORT);
|
data += sizeof(USHORT);
|
||||||
size -= sizeof(USHORT);
|
size -= sizeof(USHORT);
|
||||||
|
|
||||||
// Attibutes List
|
// Attributes List
|
||||||
o = NewListFast(NULL);
|
o = NewListFast(NULL);
|
||||||
|
|
||||||
while (LIST_NUM(o) < num)
|
while (LIST_NUM(o) < num)
|
||||||
@ -874,7 +874,7 @@ SSTP_ATTRIBUTE *SstpParseAttribute(UCHAR *data, UINT size)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the Attibute
|
// Release the Attribute
|
||||||
void SstpFreeAttribute(SSTP_ATTRIBUTE *a)
|
void SstpFreeAttribute(SSTP_ATTRIBUTE *a)
|
||||||
{
|
{
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
@ -917,9 +917,9 @@ void SstpFreePacket(SSTP_PACKET *p)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->AttibuteList != NULL)
|
if (p->AttributeList != NULL)
|
||||||
{
|
{
|
||||||
SstpFreeAttributeList(p->AttibuteList);
|
SstpFreeAttributeList(p->AttributeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->Data != NULL)
|
if (p->Data != NULL)
|
||||||
|
@ -174,7 +174,7 @@
|
|||||||
|
|
||||||
//// Type
|
//// Type
|
||||||
|
|
||||||
// SSTP Attibute
|
// SSTP Attribute
|
||||||
struct SSTP_ATTRIBUTE
|
struct SSTP_ATTRIBUTE
|
||||||
{
|
{
|
||||||
UCHAR AttributeId;
|
UCHAR AttributeId;
|
||||||
@ -191,7 +191,7 @@ struct SSTP_PACKET
|
|||||||
UCHAR *Data;
|
UCHAR *Data;
|
||||||
UINT DataSize;
|
UINT DataSize;
|
||||||
USHORT MessageType;
|
USHORT MessageType;
|
||||||
LIST *AttibuteList;
|
LIST *AttributeList;
|
||||||
};
|
};
|
||||||
|
|
||||||
// SSTP Server
|
// SSTP Server
|
||||||
|
Loading…
Reference in New Issue
Block a user