Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Неверный алгоритм поиска пользователя на хабе #973

Open
pavel-pimenov opened this issue Aug 23, 2015 · 2 comments

Comments

@pavel-pimenov
Copy link
Owner

commented Aug 23, 2015

From tret2...@gmail.com on March 15, 2013 16:51:21

UserPtr ClientManager::findLegacyUser(const string& aNick) const noexcept

в this
onlineUsers где 11 пользователей, которые есть на хабе
m_nicks 2 пользователя и почему-то только админы
m_users 18 пользователей, часть пустые

ищется сперва по m_nicks

for (auto i = m_nicks.cbegin(); i != m_nicks.cend(); ++i)
{if (stricmp(i->second, aNick) == 0)

затем ищется соответствие в m_users

UserMap::const_iterator u = m_users.find(i->first);
if (u != m_users.end() && u->second->getCID() == i->first)
return u->second;

Естественно первый поиск не находит нужного ника и возвращается пустое значение.

Необходимо пересмотреть заполнение этих значений в ClientManager.
возможно это поможет исправить падения https://crash-server.com/Problem.aspx?ClientID=ppa&ProblemID=12550

Original issue: http://code.google.com/p/flylinkdc/issues/detail?id=935

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From Pavel.Pimenov@gmail.com on July 29, 2013 22:59:16

Это что за висяк? актуально?

@pavel-pimenov

This comment has been minimized.

Copy link
Owner Author

commented Aug 23, 2015

From tret2...@gmail.com on July 29, 2013 23:33:52

надо перепроверять, возможно ёж уже пофиксил

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.