summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Skype/src/skype_chat.cpp4
-rw-r--r--protocols/Skype/src/skype_chat.h2
-rw-r--r--protocols/Skype/src/skype_proto.cpp6
-rw-r--r--protocols/Skype/src/skype_proto.h2
-rw-r--r--protocols/WhatsApp/src/WASocketConnection.cpp4
5 files changed, 14 insertions, 4 deletions
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp
index 56a26d011b..ee3626842e 100644
--- a/protocols/Skype/src/skype_chat.cpp
+++ b/protocols/Skype/src/skype_chat.cpp
@@ -336,6 +336,7 @@ void ChatRoom::Join(const wchar_t *joinBlob, CSkypeProto *ppro)
CSkypeProto::ReplaceSpecialChars(cid);
ChatRoom *room = new ChatRoom(cid, name, ppro);
+ ppro->chatRooms.insert(room);
room->Start(conversation, true);
}
}
@@ -1660,6 +1661,7 @@ void __cdecl CSkypeProto::LoadChatList(void*)
ptrW name = ::mir_utf8decodeW(data);
ChatRoom *room = new ChatRoom(cid, name, this);
+ chatRooms.insert(room);
room->Start(conversation);
}
}
@@ -1695,6 +1697,7 @@ void CSkypeProto::OnChatEvent(const ConversationRef &conversation, const Message
ptrW name = ::mir_utf8decodeW(data);
ChatRoom *room = new ChatRoom(cid, name, this);
+ chatRooms.insert(room);
room->Start(conversation, true);
}
}
@@ -1720,6 +1723,7 @@ void CSkypeProto::OnConversationListChange(
ptrW name = ::mir_utf8decodeW(data);
ChatRoom *room = new ChatRoom(cid, name, this);
+ chatRooms.insert(room);
room->Start(conversation, true);
}
}
diff --git a/protocols/Skype/src/skype_chat.h b/protocols/Skype/src/skype_chat.h
index c639f2942f..3235622348 100644
--- a/protocols/Skype/src/skype_chat.h
+++ b/protocols/Skype/src/skype_chat.h
@@ -131,7 +131,7 @@ private:
HANDLE hContact;
- LIST<ChatMember> members;
+ OBJLIST<ChatMember> members;
CSkypeProto *ppro;
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 7a64df8adf..b4890011ef 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -1,9 +1,11 @@
#include "skype.h"
+#include "skype_chat.h"
CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) :
PROTO<CSkypeProto>(protoName, userName),
Skype(1),
- skypeKitPort(8963)
+ skypeKitPort(8963),
+ chatRooms(5)
{
this->rememberPassword = false;
@@ -42,6 +44,8 @@ CSkypeProto::~CSkypeProto()
::mir_free(this->password);
this->password = NULL;
}
+
+ this->chatRooms.destroy();
}
HANDLE __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h
index a391ecd0ed..432ca34dc7 100644
--- a/protocols/Skype/src/skype_proto.h
+++ b/protocols/Skype/src/skype_proto.h
@@ -349,6 +349,8 @@ protected:
void OnChatEvent(const ConversationRef &conversation, const MessageRef &message);
+ OBJLIST<ChatRoom> chatRooms;
+
// contacts
void UpdateContactAuthState(HANDLE hContact, const ContactRef &contact);
void UpdateContactStatus(HANDLE hContact, const ContactRef &contact);
diff --git a/protocols/WhatsApp/src/WASocketConnection.cpp b/protocols/WhatsApp/src/WASocketConnection.cpp
index 15397f9932..477f463291 100644
--- a/protocols/WhatsApp/src/WASocketConnection.cpp
+++ b/protocols/WhatsApp/src/WASocketConnection.cpp
@@ -135,5 +135,5 @@ void WASocketConnection::forceShutdown() {
WASocketConnection::~WASocketConnection() {
this->forceShutdown();
- //SDLNet_TCP_Close(this->socket);
-} \ No newline at end of file
+ Netlib_CloseHandle(this->hConn);
+}