diff options
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_manager.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index 3552cf8e7d..f51d1f2811 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -689,14 +689,14 @@ bool UM_SortUser(SESSION_INFO *si, const wchar_t *pszUID) return true;
}
-USERINFO* UM_AddUser(STATUSINFO *pStatusList, SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus)
+USERINFO* UM_AddUser(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, WORD wStatus)
{
- if (pStatusList == nullptr || si == nullptr || pszNick == nullptr)
+ if (si == nullptr || pszNick == nullptr)
return nullptr;
USERINFO *node = new USERINFO();
- replaceStrW(node->pszUID, pszUID);
- replaceStrW(node->pszNick, pszNick);
+ node->pszUID = mir_wstrdup(pszUID);
+ node->pszNick = mir_wstrdup(pszNick);
node->Status = wStatus;
si->getUserList().insert(node);
return node;
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index 2eeb134218..daaab3b654 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -369,7 +369,7 @@ static void AddUser(GCEVENT *gce) WORD status = TM_StringToWord(si->pStatuses, gce->ptszStatus);
- USERINFO *ui = g_chatApi.UM_AddUser(si->pStatuses, si, gce->ptszUID, gce->ptszNick, status);
+ USERINFO *ui = g_chatApi.UM_AddUser(si, gce->ptszUID, gce->ptszNick, status);
if (ui == nullptr)
return;
|