mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Merge pull request #256 from cm0x4D/master
Using client parameter in function CtConnect
This commit is contained in:
commit
b61882598f
@ -6663,7 +6663,7 @@ bool CtConnect(CLIENT *c, RPC_CLIENT_CONNECT *connect)
|
|||||||
CiSetError(c, ERR_ACCOUNT_ACTIVE);
|
CiSetError(c, ERR_ACCOUNT_ACTIVE);
|
||||||
}
|
}
|
||||||
else if (r->ClientAuth->AuthType == CLIENT_AUTHTYPE_SECURE &&
|
else if (r->ClientAuth->AuthType == CLIENT_AUTHTYPE_SECURE &&
|
||||||
client->UseSecureDeviceId == 0)
|
c->UseSecureDeviceId == 0)
|
||||||
{
|
{
|
||||||
// Secure device is not specified
|
// Secure device is not specified
|
||||||
CiSetError(c, ERR_NO_SECURE_DEVICE_SPECIFIED);
|
CiSetError(c, ERR_NO_SECURE_DEVICE_SPECIFIED);
|
||||||
|
@ -1151,14 +1151,17 @@ UINT OvsParseKeyMethod2(OPENVPN_KEY_METHOD_2 *ret, UCHAR *data, UINT size, bool
|
|||||||
// Random2
|
// Random2
|
||||||
if (ReadBuf(b, ret->Random2, sizeof(ret->Random2)) == sizeof(ret->Random2))
|
if (ReadBuf(b, ret->Random2, sizeof(ret->Random2)) == sizeof(ret->Random2))
|
||||||
{
|
{
|
||||||
// String
|
// String
|
||||||
if (OvsReadStringFromBuf(b, ret->OptionString, sizeof(ret->OptionString)) &&
|
if (OvsReadStringFromBuf(b, ret->OptionString, sizeof(ret->OptionString)) &&
|
||||||
OvsReadStringFromBuf(b, ret->Username, sizeof(ret->Username)) &&
|
OvsReadStringFromBuf(b, ret->Username, sizeof(ret->Username)) &&
|
||||||
OvsReadStringFromBuf(b, ret->Password, sizeof(ret->Password)) &&
|
OvsReadStringFromBuf(b, ret->Password, sizeof(ret->Password)))
|
||||||
OvsReadStringFromBuf(b, ret->PeerInfo, sizeof(ret->PeerInfo)))
|
{
|
||||||
{
|
if (!OvsReadStringFromBuf(b, ret->PeerInfo, sizeof(ret->PeerInfo)))
|
||||||
read_size = b->Current;
|
{
|
||||||
}
|
Zero(ret->PeerInfo, sizeof(ret->PeerInfo));
|
||||||
|
}
|
||||||
|
read_size = b->Current;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user