mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-01-17 00:04:52 -05:00
is it a length issue?
This commit is contained in:
@@ -1416,20 +1416,17 @@ void LoginServer::onValidateClient(StationId suid, const std::string & username,
|
||||
|
||||
if (ConfigLoginServer::getDoConsumption() || ConfigLoginServer::getDoSessionLogin())
|
||||
{
|
||||
std::string const strSessionKey(sessionKey);
|
||||
size_t sessSize = sizeof(strSessionKey.c_str());
|
||||
|
||||
// pass the sessionkey
|
||||
len = sessSize + sizeof(StationId);
|
||||
memcpy(keyBufferPointer, sessionKey, sessSize);
|
||||
keyBufferPointer += len;
|
||||
memcpy(keyBufferPointer, &suid, sizeof(StationId));
|
||||
len = apiSessionIdWidth + sizeof(StationId);
|
||||
memcpy(keyBufferPointer, sessionKey, apiSessionIdWidth);
|
||||
keyBufferPointer += apiSessionIdWidth;
|
||||
|
||||
// if LoginServer did session login, send the session key back to the client;
|
||||
// the client normally gets the session key from the LaunchPad, but in this mode
|
||||
// where the LoginServer does the session login, it will get it from the LoginServer
|
||||
if (ConfigLoginServer::getDoSessionLogin())
|
||||
{
|
||||
std::string const strSessionKey(sessionKey, apiSessionIdWidth);
|
||||
GenericValueTypeMessage<std::string> const msg("SetSessionKey", strSessionKey);
|
||||
conn->send(msg, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user