diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-13 20:12:06 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-13 20:12:06 +0000 |
commit | f8830ba4d8827a9460de51e17ccd8caeed7217e2 (patch) | |
tree | c1c15b0590c89eff2644b1618982860634c497df /plugins/Dropbox/src/dropbox_services.cpp | |
parent | 5865e7f3b1013d8540e8bd5a8a012da26d6f6768 (diff) |
Dropbox: some fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@13577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_services.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_services.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index 37b807eedc..c32ebf1802 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -46,11 +46,14 @@ INT_PTR CDropbox::ProtoGetStatus(WPARAM, LPARAM) INT_PTR CDropbox::ProtoSendFile(WPARAM, LPARAM lParam)
{
- if (!HasAccessToken())
- return ACKRESULT_FAILED;
-
CCSDATA *pccsd = (CCSDATA*)lParam;
+ if (!HasAccessToken())
+ {
+ ProtoBroadcastAck(MODULE, pccsd->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, NULL, (LPARAM)"You cannot send files when you are not authorized.");
+ return 0;
+ }
+
FileTransferParam *ftp = new FileTransferParam();
ftp->pfts.flags |= PFTS_SENDING;
ftp->pfts.hContact = pccsd->hContact;
@@ -124,9 +127,6 @@ INT_PTR CDropbox::ProtoSendFile(WPARAM, LPARAM lParam) INT_PTR CDropbox::ProtoCancelFile(WPARAM, LPARAM lParam)
{
- if (!HasAccessToken())
- return ACKRESULT_FAILED;
-
CCSDATA *pccsd = (CCSDATA*)lParam;
HANDLE hTransfer = (HANDLE)pccsd->wParam;
@@ -141,11 +141,14 @@ INT_PTR CDropbox::ProtoCancelFile(WPARAM, LPARAM lParam) INT_PTR CDropbox::ProtoSendMessage(WPARAM, LPARAM lParam)
{
- if (!HasAccessToken())
- return ACKRESULT_FAILED;
-
CCSDATA *pccsd = (CCSDATA*)lParam;
+ if (!HasAccessToken())
+ {
+ ProtoBroadcastAck(MODULE, pccsd->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)"You cannot send messages when you are not authorized.");
+ return 0;
+ }
+
char *message = NULL;
char *szMessage = (char*)pccsd->lParam;
if (pccsd->wParam & PREF_UNICODE)
|