diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-03-05 16:24:30 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-03-05 16:24:30 +0000 |
commit | 4069f747578966ef1e0057566b51f74377688ffa (patch) | |
tree | 9263ee2e75d3a57a3b8f105b0ba06bc972f9ddf2 /plugins/SendScreenshotPlus/src | |
parent | abcb6e772b670f0ac54dab0314a2c64217642de8 (diff) |
SendSS: fix for sync dropbox service
git-svn-id: http://svn.miranda-ng.org/main/trunk@16430 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSendDropbox.cpp | 25 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSendDropbox.h | 5 |
2 files changed, 3 insertions, 27 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp index 6f6808ec28..dc675a6a40 100644 --- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp +++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp @@ -58,38 +58,19 @@ void CSendDropbox::SendThread() DropboxUploadInfo ui = { m_pszFile, _T("SendSS") }; - if (CallService(MS_DROPBOX_UPLOAD, 0, (LPARAM)&ui)) + char **test = &m_URL; + if (CallService(MS_DROPBOX_UPLOAD, (WPARAM)&m_URL, (LPARAM)&ui)) { - Error(LPGENT("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), (INT_PTR)m_hDropSend); + Error(LPGENT("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), 0); Exit(ACKRESULT_FAILED); return; } - m_hDropHook = HookEventObj(ME_DROPBOX_UPLOADED, OnDropSend, this); - - m_hEvent.Wait(); - UnhookEvent(m_hDropHook); - if (m_URL) svcSendMsgExit(m_URL); else Exit(ACKRESULT_FAILED); } -int CSendDropbox::OnDropSend(void *obj, WPARAM, LPARAM lParam) -{ - CSendDropbox *self = (CSendDropbox*)obj; - DropboxUploadResult *ur = (DropboxUploadResult*)lParam; - if (ur->hProcess == self->m_hDropSend) - { - if (!ur->status) - { - self->m_URL = mir_strdup(ur->data); - } - self->m_hEvent.Set(); - } - return 0; -} - void CSendDropbox::SendThreadWrapper(void * Obj) { reinterpret_cast<CSendDropbox*>(Obj)->SendThread(); diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.h b/plugins/SendScreenshotPlus/src/CSendDropbox.h index adcc331921..e138eee00f 100644 --- a/plugins/SendScreenshotPlus/src/CSendDropbox.h +++ b/plugins/SendScreenshotPlus/src/CSendDropbox.h @@ -40,13 +40,8 @@ class CSendDropbox : public CSend { int Send(); protected: - EventHandle m_hEvent; - HANDLE m_hDropHook; - HANDLE m_hDropSend; - void SendThread(); static void SendThreadWrapper(void *Obj); - static int OnDropSend(void*, WPARAM, LPARAM); static int OnDropAck(void*, WPARAM, LPARAM); }; |