summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-05-12 20:24:43 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-05-12 20:24:43 +0000
commitb3742e87f4003a80c13ece74264397b6c137096b (patch)
tree486df2f52bb840eb8524055e5fb12c2e5ee1ab24 /plugins/Dropbox/src/dropbox.cpp
parentee0a6f7683054bdb680bb9efffb16c68d87bec5a (diff)
Dropbox: attempt to terminate upload on cancel
git-svn-id: http://svn.miranda-ng.org/main/trunk@13563 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Dropbox/src/dropbox.cpp b/plugins/Dropbox/src/dropbox.cpp
index 27ab42cf8a..52fd2314ac 100644
--- a/plugins/Dropbox/src/dropbox.cpp
+++ b/plugins/Dropbox/src/dropbox.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-CDropbox::CDropbox()
+CDropbox::CDropbox() : transfers(1, HandleKeySortT)
{
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
pd.szName = MODULE;
@@ -21,6 +21,7 @@ CDropbox::CDropbox()
CreateProtoServiceFunction(MODULE, PS_GETSTATUS, ProtoGetStatus);
CreateProtoServiceFunctionObj(PS_SETSTATUS, ProtoSetStatus, this);
CreateProtoServiceFunctionObj(PSS_FILEW, ProtoSendFile, this);
+ CreateProtoServiceFunctionObj(PSS_FILECANCEL, ProtoCancelFile, this);
CreateProtoServiceFunctionObj(PSS_MESSAGE, ProtoSendMessage, this);
CreateProtoServiceFunctionObj(PSR_MESSAGE, ProtoReceiveMessage, this);
@@ -171,7 +172,7 @@ UINT CDropbox::RequestAccessTokenAsync(void *owner, void *param)
requestToken);
HttpRequest *request = new HttpRequest(instance->hNetlibConnection, REQUEST_POST, DROPBOX_API_URL "/oauth2/token");
- request->AddBasicAuthHeader(DROPBOX_API_KEY, DROPBOX_API_SECRET);
+ request->AddBasicAuthHeader(DROPBOX_APP_KEY, DROPBOX_API_SECRET);
request->AddHeader("Content-Type", "application/x-www-form-urlencoded");
request->pData = mir_strdup(data);
request->dataLength = (int)strlen(data);