1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

Using client parameter in function CtConnect

Using the global client variable might lead to strange behavoir if multiple clients are allocated and to crashes in the case the client was not initialized with CtStartClient()
This commit is contained in:
cm0x4d 2017-09-28 10:51:29 +02:00
parent e9006faf0c
commit 178a00f2d3

View File

@ -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);