summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_chat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-15 13:31:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-15 13:31:23 +0000
commit03db06c52cad84ecb2bf0b3fff8a518ff895dc19 (patch)
tree33051c9755dca9745607c6fafd233fc5f5f307b6 /protocols/MSN/src/msn_chat.cpp
parent714b5dfb8f159c8d54ef42c905c3c85f4b4e7962 (diff)
- crash fix in chats;
- static buffer returned, now with buffer overrun control; - warnings fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@13604 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_chat.cpp')
-rw-r--r--protocols/MSN/src/msn_chat.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index e928f7f403..fd3a260527 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -83,16 +83,16 @@ int CMsnProto::MSN_ChatInit(GCThreadData *info, const char *pszID, const char *p
void CMsnProto::MSN_ChatStart(ezxml_t xmli)
{
- const char *pszID, *pszCreator;
- GCThreadData* info;
+ const char *pszCreator;
+
int j;
if (!strcmp(xmli->txt, "thread")) return;
// If Chat ID already exists, don'T create a new one
- pszID = ezxml_txt(ezxml_child(xmli, "id"));
- if (!(*pszID && (info = MSN_GetThreadByChatId(_A2T(pszID)))))
- {
+ const char *pszID = ezxml_txt(ezxml_child(xmli, "id"));
+ GCThreadData* info = MSN_GetThreadByChatId(_A2T(pszID));
+ if (info = NULL) {
info = new GCThreadData;
{
mir_cslock lck(m_csThreads);
@@ -466,17 +466,9 @@ INT_PTR CALLBACK DlgInviteToChat(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
delete cont;
}
else {
- /*
- if (tEmail[0]) cont->insertn(tEmail);
- param->ppro->MsgQueue_Add("chat", 'X', NULL, 0, NULL, 0, cont);
- if (param->ppro->msnLoggedIn)
- param->ppro->msnNsThread->sendPacket("XFR", "SB");
- */
- CMStringA buf;
- int myNetId = param->ppro->GetMyNetID();
-
/* Group chats only work for Skype users */
- buf.AppendFormat("<thread><id></id><members><member><mri>%d:%s</mri><role>admin</role></member>",
+ CMStringA buf;
+ buf.AppendFormat("<thread><id></id><members><member><mri>%d:%s</mri><role>admin</role></member>",
NETID_SKYPE, param->ppro->GetMyUsername(NETID_SKYPE));
for (int i = 0; i < cont->getCount(); ++i) {
// TODO: Add support for assigning role in invite dialog maybe?