From 8b242ddc84896c59f2a53cbfe37f94b275238a7c Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 4 Oct 2014 03:12:21 +0000 Subject: Tox: code reordering git-svn-id: http://svn.miranda-ng.org/main/trunk@10681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_proto.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/Tox/src/tox_proto.cpp') 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(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); } -- cgit v1.2.3