diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-23 19:43:54 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-23 19:43:54 +0000 |
commit | 9b45dbb35a3fb8a9885b72da231bf03671979d86 (patch) | |
tree | 0fa5ff21eca76d822666aab8b94d7deacd88b6ba /protocols/Tox/src/tox_profile.cpp | |
parent | 2a815f8820ca402626bd283dd5b75744ddeb9812 (diff) |
Tox: updated tox core
git-svn-id: http://svn.miranda-ng.org/main/trunk@13792 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_profile.cpp')
-rw-r--r-- | protocols/Tox/src/tox_profile.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index c422dcc947..4e2f450dfd 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -16,7 +16,7 @@ std::tstring CToxProto::GetToxProfilePath(const TCHAR *accountName) return profilePath;
}
-bool CToxProto::LoadToxProfile(const Tox_Options *options)
+bool CToxProto::LoadToxProfile(Tox_Options *options)
{
debugLogA(__FUNCTION__": loading tox profile");
@@ -78,8 +78,15 @@ bool CToxProto::LoadToxProfile(const Tox_Options *options) size -= TOX_PASS_ENCRYPTION_EXTRA_LENGTH;
}
+ if (data)
+ {
+ options->savedata_data = data;
+ options->savedata_length = size;
+ options->savedata_type = TOX_SAVEDATA_TYPE_TOX_SAVE;
+ }
+
TOX_ERR_NEW initError;
- tox = tox_new(options, data, size, &initError);
+ tox = tox_new(options, &initError);
if (initError != TOX_ERR_NEW_OK)
{
debugLogA(__FUNCTION__": failed to load tox profile (%d)", initError);
@@ -146,8 +153,8 @@ INT_PTR CToxProto::OnCopyToxID(WPARAM, LPARAM) }
CToxPasswordEditor::CToxPasswordEditor(CToxProto *proto) :
-CToxDlgBase(proto, IDD_PASSWORD, false), ok(this, IDOK),
-password(this, IDC_PASSWORD), savePermanently(this, IDC_SAVEPERMANENTLY)
+ CToxDlgBase(proto, IDD_PASSWORD, false), ok(this, IDOK),
+ password(this, IDC_PASSWORD), savePermanently(this, IDC_SAVEPERMANENTLY)
{
ok.OnClick = Callback(this, &CToxPasswordEditor::OnOk);
}
|