From fabb5ec61205a9a3dca6f82645f257d00a534572 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Jan 2014 13:53:27 +0000 Subject: forgotten to declare two remaining fields as const git-svn-id: http://svn.miranda-ng.org/main/trunk@7591 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_chat.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'protocols/Skype') diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index f97a44ac5a..01b62ea3ed 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -255,7 +255,7 @@ void ChatRoom::Start(const ConversationRef &conversation, bool showWindow) this->conversation.fetch(); this->conversation->SetChatRoom(this); - GC_INFO gci = {0}; + GC_INFO gci = { 0 }; gci.Flags = BYID | HCONTACT; gci.pszModule = ppro->m_szModuleName; gci.pszID = this->cid; @@ -1207,11 +1207,13 @@ INT_PTR CSkypeProto::CreateChatRoomCommand(WPARAM, LPARAM) void CSkypeProto::ChatRoomInvite(HANDLE hContact) { - GC_INFO gci = {0}; + ptrT chat_id(::db_get_tsa(hContact, this->m_szModuleName, "ChatRoomID")); + + GC_INFO gci = { 0 }; gci.Flags = BYID | USERS | DATA; gci.pszModule = this->m_szModuleName; - gci.pszID = ::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"); - if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci)) + gci.pszID = chat_id; + if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci)) { ChatRoom *room = (ChatRoom *)gci.dwItemData; if (room != NULL && gci.pszUsers != NULL) @@ -1225,7 +1227,6 @@ void CSkypeProto::ChatRoomInvite(HANDLE hContact) delete param; } } - ::mir_free(gci.pszID); } void CSkypeProto::CloseAllChatSessions() @@ -1250,7 +1251,7 @@ void CSkypeProto::CloseAllChatSessions() ChatRoom *CSkypeProto::FindChatRoom(const wchar_t *cid) { - GC_INFO gci = {0}; + GC_INFO gci = { 0 }; gci.Flags = BYID | DATA; gci.pszModule = this->m_szModuleName; gci.pszID = (wchar_t*)cid; @@ -1362,11 +1363,11 @@ int __cdecl CSkypeProto::OnGCEventHook(WPARAM, LPARAM lParam) case CHAT_LIST_MENU::ICM_CONF_INVITE: { - GC_INFO gci = {0}; + GC_INFO gci = { 0 }; gci.Flags = BYID | USERS; gci.pszModule = this->m_szModuleName; gci.pszID = gch->pDest->ptszID; - if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci) && gci.pszUsers != NULL) + if ( !::CallService(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.pszUsers != NULL) { StringList invitedContacts(_A2T(gci.pszUsers)); ChatRoomParam *param = new ChatRoomParam(NULL, invitedContacts, this); @@ -1502,7 +1503,7 @@ void CSkypeProto::UpdateChatUserStatus(const ContactRef &contact) contact->GetIdentity(identity); ptrW sid(::mir_utf8decodeW(identity)); - GC_INFO gci = {0}; + GC_INFO gci = { 0 }; gci.Flags = BYINDEX | DATA; gci.pszModule = this->m_szModuleName; @@ -1531,7 +1532,7 @@ void CSkypeProto::UpdateChatUserNick(const ContactRef &contact) ptrW nick(::mir_utf8decodeW(((CContact::Ref)contact)->GetNick())); - GC_INFO gci = {0}; + GC_INFO gci = { 0 }; gci.Flags = BYINDEX | DATA; gci.pszModule = this->m_szModuleName; -- cgit v1.2.3