summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-04-24 11:55:06 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-04-24 11:55:06 +0000
commit79812b0325d58e7954d4aec16aa8dddfec9c5479 (patch)
tree14f43bbd89d64e1dd5190694cbb31d67950b0065 /plugins/Dropbox/src/dropbox.cpp
parent2c31feb35459e84ac1964030ba46e90038601436 (diff)
Dropbox: fix auth flow
git-svn-id: http://svn.miranda-ng.org/main/trunk@16759 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Dropbox/src/dropbox.cpp b/plugins/Dropbox/src/dropbox.cpp
index 907986095e..954e9191c4 100644
--- a/plugins/Dropbox/src/dropbox.cpp
+++ b/plugins/Dropbox/src/dropbox.cpp
@@ -90,8 +90,8 @@ void CDropbox::RequestAccountInfo(void *p)
JSONNode name = root.at("name");
if (!name.empty()) {
- db_set_ts(hContact, MODULE, "FirstName", ptrT(mir_utf8decodeT(name.at("given_name").as_string().c_str())));
- db_set_ts(hContact, MODULE, "LastName", ptrT(mir_utf8decodeT(name.at("surname").as_string().c_str())));
+ db_set_utf(hContact, MODULE, "FirstName", name.at("given_name").as_string().c_str());
+ db_set_utf(hContact, MODULE, "LastName", name.at("surname").as_string().c_str());
}
JSONNode country = root.at("country");
@@ -151,7 +151,7 @@ UINT CDropbox::RequestAccessTokenAsync(void *owner, void *param)
GetAccessTokenRequest request(requestToken);
NLHR_PTR response(request.Send(instance->hNetlibConnection));
- if (response == NULL) {
+ if (response == NULL || response->resultCode != HTTP_STATUS_OK) {
Netlib_Logf(instance->hNetlibConnection, "%s: %s", MODULE, HttpStatusToText(HTTP_STATUS_ERROR));
if (hwndDlg)
SetDlgItemText(hwndDlg, IDC_AUTH_STATUS, TranslateT("server does not respond"));