maybe get closer...

This commit is contained in:
DarthArgus
2016-12-31 21:56:41 -06:00
parent a0f86b45e7
commit b144bbd265
@@ -1422,9 +1422,9 @@ void LoginServer::onValidateClient(StationId suid, const std::string & username,
if (ConfigLoginServer::getDoConsumption() || ConfigLoginServer::getDoSessionLogin())
{
// pass the sessionkey
len = apiSessionIdWidth + sizeof(StationId);
memcpy(keyBufferPointer, sessionKey, apiSessionIdWidth);
keyBufferPointer += apiSessionIdWidth;
//len = apiSessionIdWidth + sizeof(StationId);
memcpy(keyBufferPointer, sessionKey, sizeof(sessionKey));
keyBufferPointer += sizeof(sessionKey);
memcpy(keyBufferPointer, &suid, sizeof(StationId));
// if LoginServer did session login, send the session key back to the client;
@@ -1432,7 +1432,7 @@ void LoginServer::onValidateClient(StationId suid, const std::string & username,
// where the LoginServer does the session login, it will get it from the LoginServer
if (ConfigLoginServer::getDoSessionLogin())
{
std::string const strSessionKey(sessionKey, apiSessionIdWidth);
std::string const strSessionKey(sessionKey, sizeof(sessionKey));
GenericValueTypeMessage<std::string> const msg("SetSessionKey", strSessionKey);
conn->send(msg, true);
}