From b3742e87f4003a80c13ece74264397b6c137096b Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 12 May 2015 20:24:43 +0000 Subject: Dropbox: attempt to terminate upload on cancel git-svn-id: http://svn.miranda-ng.org/main/trunk@13563 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dropbox/src/file_transfer.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'plugins/Dropbox/src/file_transfer.h') diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h index 3def765d3e..8afb1b4ec3 100644 --- a/plugins/Dropbox/src/file_transfer.h +++ b/plugins/Dropbox/src/file_transfer.h @@ -23,8 +23,10 @@ struct FileTransferParam MCONTACT hContact; PROTOFILETRANSFERSTATUS pfts; + bool isTerminated; + int totalFolders; - TCHAR **pwszFolders; + TCHAR **ptszFolders; int relativePathStart; LIST urlList; @@ -32,9 +34,11 @@ struct FileTransferParam FileTransferParam() : urlList(1) { totalFolders = 0; - pwszFolders = NULL; + ptszFolders = NULL; relativePathStart = 0; + isTerminated = false; + pfts.cbSize = sizeof(this->pfts); pfts.flags = PFTS_TCHAR; pfts.currentFileNumber = 0; @@ -45,13 +49,13 @@ struct FileTransferParam pfts.totalProgress = 0; pfts.pszFiles = NULL; pfts.tszWorkingDir = NULL; - pfts.wszCurrentFile = NULL; + pfts.tszCurrentFile = NULL; } ~FileTransferParam() { - if (pfts.wszWorkingDir) - mir_free(pfts.wszWorkingDir); + if (pfts.tszWorkingDir) + mir_free(pfts.tszWorkingDir); if (pfts.pszFiles) { @@ -62,13 +66,13 @@ struct FileTransferParam mir_free(pfts.pszFiles); } - if (pwszFolders) + if (ptszFolders) { - for (int i = 0; pwszFolders[i]; i++) + for (int i = 0; ptszFolders[i]; i++) { - if (pwszFolders[i]) mir_free(pwszFolders[i]); + if (ptszFolders[i]) mir_free(ptszFolders[i]); } - mir_free(pwszFolders); + mir_free(ptszFolders); } for (int i = 0; i < urlList.getCount(); i++) -- cgit v1.2.3