summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-10-04 03:12:21 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-10-04 03:12:21 +0000
commit8b242ddc84896c59f2a53cbfe37f94b275238a7c (patch)
tree8781a4cb3dda81072814d0518f70a37fe0db1fa6 /protocols/Tox/src/tox_proto.cpp
parent6a3c12bfd2a1829ac537a3b615d42c1e956a0586 (diff)
Tox: code reordering
git-svn-id: http://svn.miranda-ng.org/main/trunk@10681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r--protocols/Tox/src/tox_proto.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 485c049c33..ea60618fac 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -3,6 +3,8 @@
CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
PROTO<CToxProto>(protoName, userName)
{
+ InitNetlib();
+ InitToxCore();
accountName = mir_tstrdup(userName);
CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit);
@@ -48,6 +50,8 @@ CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
CToxProto::~CToxProto()
{
mir_free(accountName);
+ UninitToxCore();
+ UninitNetlib();
}
DWORD_PTR __cdecl CToxProto::GetCaps(int type, MCONTACT hContact)
@@ -235,9 +239,6 @@ int __cdecl CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM
case EV_PROTO_ONRENAME:
return OnAccountRenamed(wParam, lParam);
- case EV_PROTO_ONEXIT:
- return OnAccountUnloaded(wParam, lParam);
-
case EV_PROTO_ONCONTACTDELETED:
return OnContactDeleted(wParam, lParam);
}