From ed9fa764b873d1ae27ab98249a5d3bb31c253bdb Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 7 Sep 2015 19:40:25 +0000 Subject: Tox: - change error message when tox core initialization is failed - trying to fix error with keepstatus reconnect git-svn-id: http://svn.miranda-ng.org/main/trunk@15297 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_core.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/src/tox_core.cpp') diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 242a2eafa9..c8d30cf2ce 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -31,7 +31,7 @@ bool CToxProto::InitToxCore() if (nlus.proxyType == PROXYTYPE_SOCKS4 || nlus.proxyType == PROXYTYPE_SOCKS5) { - debugLogA("CToxProto::InitToxCore: setting socks user proxy config"); + debugLogA(__FUNCTION__": setting socks user proxy config"); options->proxy_type = TOX_PROXY_TYPE_SOCKS5; mir_strcpy((char*)&options->proxy_host[0], nlus.szProxyServer); options->proxy_port = nlus.wProxyPort; @@ -41,6 +41,16 @@ bool CToxProto::InitToxCore() if (LoadToxProfile(options)) { + TOX_ERR_NEW initError; + tox = tox_new(options, &initError); + if (initError != TOX_ERR_NEW_OK) + { + debugLogA(__FUNCTION__": failed to initialize tox core (%d)", initError); + ShowNotification(ToxErrorToString(initError), TranslateT("Unable to initialize tox core"), MB_ICONERROR); + tox_options_free(options); + return false; + } + tox_callback_friend_request(tox, OnFriendRequest, this); tox_callback_friend_message(tox, OnFriendMessage, this); tox_callback_friend_read_receipt(tox, OnReadReceipt, this); -- cgit v1.2.3