summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp')
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
index 9352e29de6..d98a07e194 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
@@ -2,7 +2,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
- Copyright (C) 2014-24 Miranda NG team (https://miranda-ng.org)
+ Copyright (C) 2014-25 Miranda NG team (https://miranda-ng.org)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
@@ -35,18 +35,18 @@ int CSendHost_Imgur::Send()
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
-
+
m_pRequest.reset(new MHttpRequest(REQUEST_POST));
- char* tmp; tmp = mir_u2a(m_pszFile);
+ T2Utf tmp(m_pszFile);
HTTPFormData frm[] = {
{ "Authorization", HTTPFORM_HEADER("Client-ID 2a7303d78abe041") },
{ "image", HTTPFORM_FILE(tmp) },
};
int error = HTTPFormCreate(m_pRequest.get(), "https://api.imgur.com/3/image", frm, _countof(frm));
- mir_free(tmp);
if (error)
return !m_bAsync;
+
// start upload thread
if (m_bAsync) {
mir_forkthread(&CSendHost_Imgur::SendThread, this);
@@ -56,9 +56,9 @@ int CSendHost_Imgur::Send()
return 1;
}
-void CSendHost_Imgur::SendThread(void* obj)
+void CSendHost_Imgur::SendThread(void *obj)
{
- CSendHost_Imgur *self = (CSendHost_Imgur*)obj;
+ CSendHost_Imgur *self = (CSendHost_Imgur *)obj;
// send DATA and wait for m_nlreply
NLHR_PTR reply(Netlib_HttpTransaction(g_hNetlibUser, self->m_pRequest.get()));
if (reply) {